Skip to content

Commit 946065a

Browse files
committed
fix: fix setx script fallback on Windows
1 parent 4d58866 commit 946065a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/env/addEnv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function addEnv(name: string, val: string | undefined) {
2929
function addEnvSystem(name: string, val: string | undefined) {
3030
switch (process.platform) {
3131
case "win32": {
32-
execa.sync(`setx "${name}"="${val}"`)
32+
execa.sync(`setx "${name}" "${val}"`)
3333
core.info(`${name}="${val} was set in the environment."`)
3434
return
3535
}

src/utils/path/addPath.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function addPath(path: string) {
2828
function addPathSystem(path: string) {
2929
switch (process.platform) {
3030
case "win32": {
31-
execa.sync(`setx PATH=${path};%PATH%`)
31+
execa.sync(`setx PATH "${path};%PATH%"`)
3232
core.info(`${path} was added to the PATH.`)
3333
return
3434
}

0 commit comments

Comments
 (0)