Skip to content

Commit a48982e

Browse files
committed
fix: fix invalid husky integration
1 parent 92f55e5 commit a48982e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { addHook } from '../husky/husky.utils';
1+
import { addHook, isHuskyInstalled } from '../husky/husky.utils';
22
import { CLI_NAME } from './commitlint.config';
33

44
export const huskyIntegration = async () => {
5-
await addHook('commit-msg', `npx --no-install -- ${CLI_NAME} --edit "$1"`);
5+
if (await isHuskyInstalled()) {
6+
await addHook('commit-msg', `npx --no-install -- ${CLI_NAME} --edit "$1"`);
7+
}
68
};

0 commit comments

Comments
 (0)