Fix arch conversion

This commit is contained in:
panticmilos 2022-08-08 14:13:08 +02:00
parent c5cf47b1d5
commit 93cf84c15c
3 changed files with 12 additions and 25 deletions

View file

@ -223,9 +223,9 @@ async function getInfoFromDist(
export async function findMatch(
versionSpec: string,
arch = sys.getArch()
arch = os.arch()
): Promise<IGoVersion | undefined> {
let archFilter = translateArchToDistUrl(arch);
let archFilter = sys.getArch(arch);
let platFilter = sys.getPlatform();
let result: IGoVersion | undefined;
@ -323,12 +323,3 @@ export function parseGoVersionFile(versionFilePath: string): string {
return contents.trim();
}
function translateArchToDistUrl(arch: string): string {
switch (arch) {
case 'arm':
return 'armv6l';
default:
return arch;
}
}