Skip to content

Commit cf539a8

Browse files
committed
skip git hooks setup in ci environments
1 parent 1cc2871 commit cf539a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xblockorigin",
3-
"version": "27.0.0",
3+
"version": "28.0.0",
44
"type": "module",
55
"scripts": {
66
"postinstall": "bun run setup-hooks",

scripts/setup-hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ const preCommitPath = join(gitHooksDir, 'pre-commit')
77

88
// check if .git/hooks exists
99
if (!existsSync(gitHooksDir)) {
10-
console.error('Error: .git/hooks directory not found. Are you in a git repository?')
11-
process.exit(1)
10+
console.log('Skipping git hooks setup (not in a git repository or CI environment)')
11+
process.exit(0)
1212
}
1313

1414
// create pre-commit hook

0 commit comments

Comments
 (0)