in src/Setup.ts [33:50]
private static async downloadAndExtractSqlcmd(): Promise<string> {
let downloadPath: string;
switch (process.platform) {
case 'linux':
downloadPath = await tc.downloadTool(`https://github.com/microsoft/go-sqlcmd/releases/download/v${sqlcmdVersion}/sqlcmd-v${sqlcmdVersion}-linux-x64.tar.bz2`);
return await tc.extractTar(downloadPath, undefined, 'xj');
case 'win32':
// forcing a .zip extension on the downloaded item due to inconsistent windows behavior in unzipping files with no extension
// upstream issue: https://github.com/actions/toolkit/issues/1179
const dest = path.join(process.env['RUNNER_TEMP'] || '', uuidV4()+'.zip');
downloadPath = await tc.downloadTool(`https://github.com/microsoft/go-sqlcmd/releases/download/v${sqlcmdVersion}/sqlcmd-v${sqlcmdVersion}-windows-x64.zip`, dest);
return await tc.extractZip(downloadPath);
default:
throw new Error(`Runner OS is not supported: ${process.platform}`);
}
}