fix: allow read/write for everyon in ~/vcpkg

This commit is contained in:
Amin Yahyaabadi 2022-04-24 17:45:44 -07:00
parent 9b3e93e13e
commit 493b9631f5
3 changed files with 8 additions and 2 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

@ -28,6 +28,12 @@ export async function setupVcpkg(_version: string, setupDir: string, _arch: stri
warning(`Vcpkg folder already exists at ${setupDir}`)
}
// allow read/write for everyone in setupDir. vcpkg requires this so it can install things without sudo
if (process.platform === "linux" || process.platform === "darwin") {
// https://chmodcommand.com/chmod-666/
execa.sync("chmod", ["-R", "666", setupDir], { cwd: setupDir, stdio: "inherit" })
}
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true, stdio: "inherit" })
addPath(setupDir)
// eslint-disable-next-line require-atomic-updates