mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
fix(hooks): skip repo check outside workspace
This commit is contained in:
parent
cf2a66b508
commit
a2174f1ff1
1 changed files with 7 additions and 2 deletions
|
|
@ -48,5 +48,10 @@ fi
|
|||
|
||||
git add -- "${files[@]}"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
pnpm check
|
||||
# This hook is also exercised from lightweight temp repos in tests, where the
|
||||
# staged-file safety behavior matters but the full OpenClaw workspace does not
|
||||
# exist. Only run the repo-wide gate inside a real checkout.
|
||||
if [[ -f "$ROOT_DIR/package.json" ]] && [[ -f "$ROOT_DIR/pnpm-lock.yaml" ]]; then
|
||||
cd "$ROOT_DIR"
|
||||
pnpm check
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue