improve install

This commit is contained in:
Fritz Larco 2022-11-12 17:00:09 -03:00
parent 4d25ab4fd4
commit b60ea886c6
1 changed files with 5 additions and 4 deletions

View File

@ -29,11 +29,12 @@ export async function install(distribution: string, version: string): Promise<st
let extPath: string;
if (context.osPlat == 'win32') {
if(!downloadPath.endsWith('.zip')) {
let newPath = downloadPath + '.zip'
fs.renameSync(downloadPath, newPath)
downloadPath = newPath
let newPath = downloadPath + '.zip';
fs.renameSync(downloadPath, newPath);
extPath = await tc.extractZip(newPath);
} else {
extPath = await tc.extractZip(downloadPath);
}
extPath = await tc.extractZip(downloadPath);
} else {
extPath = await tc.extractTar(downloadPath);
}