mirror of https://github.com/aminya/setup-cpp
fix: fix setx script fallback on Windows
This commit is contained in:
parent
4d58866439
commit
946065a48d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ export function addEnv(name: string, val: string | undefined) {
|
|||
function addEnvSystem(name: string, val: string | undefined) {
|
||||
switch (process.platform) {
|
||||
case "win32": {
|
||||
execa.sync(`setx "${name}"="${val}"`)
|
||||
execa.sync(`setx "${name}" "${val}"`)
|
||||
core.info(`${name}="${val} was set in the environment."`)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export function addPath(path: string) {
|
|||
function addPathSystem(path: string) {
|
||||
switch (process.platform) {
|
||||
case "win32": {
|
||||
execa.sync(`setx PATH=${path};%PATH%`)
|
||||
execa.sync(`setx PATH "${path};%PATH%"`)
|
||||
core.info(`${path} was added to the PATH.`)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue