We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e03229b commit ad5b7cdCopy full SHA for ad5b7cd
packages/lobe-commit/src/constants/hook.ts
@@ -1,12 +1,14 @@
1
export const HOOK = {
2
- CONTENTS:
3
- '#!/usr/bin/env sh\n# lobe-commit as a commit hook\n' +
4
- 'if npx -v >&/dev/null\n' +
5
- 'then\n' +
6
- ' exec < /dev/tty\n npx -c "lobe-commit --hook $1 $2"\n' +
7
- 'else\n' +
8
- ' exec < /dev/tty\n lobe-commit --hook $1 $2\n' +
9
- 'fi',
+ CONTENTS: `#!/usr/bin/env sh
+# lobe-commit as a commit hook
+if npx -v >/dev/null 2>&1
+then
+ exec < /dev/tty
+ npx -c "lobe-commit --hook $1 $2"
+else
10
+ lobe-commit --hook $1 $2
11
+fi`,
12
FILENAME: 'prepare-commit-msg',
13
PERMISSIONS: 0o775,
14
};
0 commit comments