mirror of https://github.com/aminya/setup-cpp
fix: quote the path in addEnv on Unix
This commit is contained in:
parent
79079b96ca
commit
0cedb62c7b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -79,14 +79,14 @@ async function addPathSystem(path: string) {
|
||||||
await execPowershell(
|
await execPowershell(
|
||||||
`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${path};$USER_PATH", "User")`
|
`$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
|
return
|
||||||
}
|
}
|
||||||
case "linux":
|
case "linux":
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
setupCppInProfile()
|
setupCppInProfile()
|
||||||
appendFileSync(cpprc_path, `\nexport PATH=${path}:$PATH\n`)
|
appendFileSync(cpprc_path, `\nexport PATH="${path}:$PATH"\n`)
|
||||||
info(`${path} was added to "${cpprc_path}"`)
|
info(`"${path}" was added to "${cpprc_path}"`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Reference in New Issue