fix: fix the ubuntu powershell url

This commit is contained in:
Amin Yahyaabadi 2022-08-08 01:44:32 -07:00
parent 69281e0bf1
commit 1b9b07144d
5 changed files with 8 additions and 8 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
dist/setup_cpp.mjs vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -35,11 +35,11 @@ export async function setupPowershell(version: string | undefined, _setupDir: st
} else if (isUbuntu()) {
await setupAptPack("curl")
const ubuntuVerSplitted = (await ubuntuVersion())!
const ubuntuVersionString = `${ubuntuVerSplitted[0]}.${ubuntuVerSplitted[1]}`
const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`
execRootSync("/bin/bash", [
"-c",
`curl -LJO "https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb"`,
execRootSync("curl", [
"-LJO",
`https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,
])
execRootSync("dpkg", ["-i", "packages-microsoft-prod.deb"])