Skip to content

Commit 6ca7947

Browse files
committed
Fix sass command on windows
1 parent 8cbf060 commit 6ca7947

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/sass.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env node
22

33
import * as child_process from 'child_process';
4+
import * as path from 'path';
45
import {compilerCommand} from '../lib/src/compiler-path';
56

67
// TODO npm/cmd-shim#152 and yarnpkg/berry#6422 - If and when the package
@@ -12,6 +13,10 @@ try {
1213
compilerCommand[0],
1314
[...compilerCommand.slice(1), ...process.argv.slice(2)],
1415
{
16+
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
17+
shell: ['.bat', '.cmd'].includes(
18+
path.extname(compilerCommand[0]).toLowerCase()
19+
),
1520
stdio: 'inherit',
1621
windowsHide: true,
1722
}

0 commit comments

Comments
 (0)