Skip to content

Commit 552fac2

Browse files
committed
Fix dynwinrt codegen invocation on Windows
1 parent f92fcad commit 552fac2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/generate-store-bindings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function splitCommand(command) {
2020

2121
function run(args) {
2222
const [bin, ...binArgs] = splitCommand(codegenCommand);
23+
const resolvedBin = process.platform === 'win32' && bin.toLowerCase() === 'npx' ? 'npx.cmd' : bin;
2324
const rendered = `${codegenCommand} ${args.join(' ')}`;
2425
console.log(`> ${rendered}`);
25-
execFileSync(bin, [...binArgs, ...args], {
26+
execFileSync(resolvedBin, [...binArgs, ...args], {
2627
stdio: 'inherit',
27-
shell: true,
2828
});
2929
}
3030

0 commit comments

Comments
 (0)