diff --git a/.hooks/pre-push b/.hooks/pre-push index d043d92e..856fc641 100755 --- a/.hooks/pre-push +++ b/.hooks/pre-push @@ -43,10 +43,18 @@ custodian_multi="" if command -v custodian-multi >/dev/null 2>&1; then custodian_multi="$(command -v custodian-multi)" fi +# A worktree has no venv of its own — the interpreter lives in the main clone, so +# the main_clone_root candidates are the ones that actually resolve there. Without +# them a worktree push on a box whose only custodian-multi is /.venv/bin +# (no PATH entry, no sibling Custodian checkout — the fleet's layout) dies on +# "custodian-multi not found". For a plain checkout main_clone_root == repo_root, +# so these are harmless duplicates of the two above. for candidate in \ "$custodian_multi" \ "$repo_root/.venv/bin/custodian-multi" \ "$repo_root/.warehouse-venv/bin/custodian-multi" \ + "$main_clone_root/.venv/bin/custodian-multi" \ + "$main_clone_root/.warehouse-venv/bin/custodian-multi" \ "$workspace_root/Custodian/.venv/bin/custodian-multi" do if [ -x "$candidate" ]; then