Skip to content

Commit 8eb83ee

Browse files
committed
chore(precommit): fix on windows
1 parent 2235939 commit 8eb83ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/precommit.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ function run(command: string, description: string) {
99
try {
1010
// Use npm to run the commands for better cross-platform compatibility
1111
const [cmd, ...args] = command.split(" ");
12-
execFileSync(cmd, args, { stdio: "inherit", shell: false });
13-
} catch {
14-
console.error(`✗ Failed: ${description || command}`);
12+
execFileSync(cmd, args, { stdio: "inherit", shell: true });
13+
} catch (error) {
14+
console.error(`✗ Failed`, { description, command, error });
1515
process.exit(1);
1616
}
1717
}

0 commit comments

Comments
 (0)