fix: fix setx script fallback on Windows

This commit is contained in:
Amin Yahyaabadi 2022-01-22 20:25:15 -08:00
parent 4d58866439
commit 946065a48d
4 changed files with 4 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

@ -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
}

View File

@ -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
}