Skip to content

Commit 1713a93

Browse files
committed
fix: addHook invalid args bug
1 parent a9bfe7d commit 1713a93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/categories/js/husky.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { addScripts, installDevelopmentDependencies, runScript } from "src/utils/npm";
2-
import { runCommand } from "src/utils/run-command";
2+
import { spawnCommand } from "src/utils/run-command";
33

44
type HookName = 'pre-commit' | 'commit-msg';
55

66
export const addHook = async (name: HookName, script: string) => {
7-
await runCommand(`npx husky add .husky/${name} "${script}"`);
7+
await spawnCommand('npx', ['husky', 'add', `.husky/${name}`, `'${script}'`]);
88
};
99

1010
export const husky = async () => {

0 commit comments

Comments
 (0)