Skip to content

Commit

Permalink
Fix test regression caused by node fixing CVE-2024-27980 (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme authored and nex3 committed Apr 19, 2024
1 parent 625e11d commit 6e9368e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/compiler/async.ts
Expand Up @@ -43,6 +43,10 @@ export class AsyncCompiler {
// current working directory.
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1438712923
cwd: path.dirname(compilerCommand[0]),
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
shell: ['.bat', '.cmd'].includes(
path.extname(compilerCommand[0]).toLowerCase()
),
windowsHide: true,
}
);
Expand Down
4 changes: 4 additions & 0 deletions lib/src/compiler/sync.ts
Expand Up @@ -43,6 +43,10 @@ export class Compiler {
// current working directory.
// https://github.com/sass/embedded-host-node/pull/261#discussion_r1438712923
cwd: path.dirname(compilerCommand[0]),
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
shell: ['.bat', '.cmd'].includes(
path.extname(compilerCommand[0]).toLowerCase()
),
windowsHide: true,
}
);
Expand Down

0 comments on commit 6e9368e

Please sign in to comment.