fix: quote the path in addEnv on Unix

This commit is contained in:
Amin Yahyaabadi 2022-07-27 17:44:51 -07:00
parent 79079b96ca
commit 0cedb62c7b
5 changed files with 7 additions and 7 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

@ -79,14 +79,14 @@ async function addPathSystem(path: string) {
await execPowershell(
`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${path};$USER_PATH", "User")`
)
info(`${path} was added to the PATH.`)
info(`"${path}" was added to the PATH.`)
return
}
case "linux":
case "darwin": {
setupCppInProfile()
appendFileSync(cpprc_path, `\nexport PATH=${path}:$PATH\n`)
info(`${path} was added to "${cpprc_path}"`)
appendFileSync(cpprc_path, `\nexport PATH="${path}:$PATH"\n`)
info(`"${path}" was added to "${cpprc_path}"`)
return
}
default: {