fix: use .bat extension for bootstrap-vcpkg

This commit is contained in:
Amin Yahyaabadi 2022-08-21 20:40:28 -07:00
parent 338c5727b5
commit 60423515f0
3 changed files with 8 additions and 4 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

View File

@ -44,13 +44,17 @@ export async function setupVcpkg(_version: string, setupDir: string, _arch: stri
} }
} }
if (!existsSync(join(setupDir, addShExt("bootstrap-vcpkg")))) { if (!existsSync(join(setupDir, addShExt("bootstrap-vcpkg", ".bat")))) {
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir), stdio: "inherit" }) execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir), stdio: "inherit" })
} else { } else {
notice(`Vcpkg folder already exists at ${setupDir}. This might mean that ~/vcpkg is restored from the cache.`) notice(`Vcpkg folder already exists at ${setupDir}. This might mean that ~/vcpkg is restored from the cache.`)
} }
execa.sync(addShExt(addShRelativePrefix("bootstrap-vcpkg")), { cwd: setupDir, shell: true, stdio: "inherit" }) execa.sync(addShExt(addShRelativePrefix("bootstrap-vcpkg"), ".bat"), {
cwd: setupDir,
shell: true,
stdio: "inherit",
})
giveUserAccess(setupDir) giveUserAccess(setupDir)