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) {
|
function addEnvSystem(name: string, val: string | undefined) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
execa.sync(`setx "${name}"="${val}"`)
|
execa.sync(`setx "${name}" "${val}"`)
|
||||||
core.info(`${name}="${val} was set in the environment."`)
|
core.info(`${name}="${val} was set in the environment."`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ export function addPath(path: string) {
|
||||||
function addPathSystem(path: string) {
|
function addPathSystem(path: string) {
|
||||||
switch (process.platform) {
|
switch (process.platform) {
|
||||||
case "win32": {
|
case "win32": {
|
||||||
execa.sync(`setx PATH=${path};%PATH%`)
|
execa.sync(`setx PATH "${path};%PATH%"`)
|
||||||
core.info(`${path} was added to the PATH.`)
|
core.info(`${path} was added to the PATH.`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue