Skip to content

Commit 6e9368e

Browse files
ntkmenex3
authored andcommitted
Fix test regression caused by node fixing CVE-2024-27980 (#286)
1 parent 625e11d commit 6e9368e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/src/compiler/async.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export class AsyncCompiler {
4343
// current working directory.
4444
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1438712923
4545
cwd: path.dirname(compilerCommand[0]),
46+
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
47+
shell: ['.bat', '.cmd'].includes(
48+
path.extname(compilerCommand[0]).toLowerCase()
49+
),
4650
windowsHide: true,
4751
}
4852
);

lib/src/compiler/sync.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export class Compiler {
4343
// current working directory.
4444
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1438712923
4545
cwd: path.dirname(compilerCommand[0]),
46+
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
47+
shell: ['.bat', '.cmd'].includes(
48+
path.extname(compilerCommand[0]).toLowerCase()
49+
),
4650
windowsHide: true,
4751
}
4852
);

0 commit comments

Comments
 (0)