Skip to content

Commit c90566f

Browse files
authored
fix: harden codex sync CI hermeticity (anomalyco#1020)
* test: isolate package-manager dependent hooks and formatter tests * fix: export codex sync env to child scripts
1 parent b9a01d3 commit c90566f

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

‎scripts/sync-ecc-to-codex.sh‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,16 +460,28 @@ fi
460460

461461
log "Installing global git safety hooks"
462462
if [[ "$MODE" == "dry-run" ]]; then
463-
"$HOOKS_INSTALLER" --dry-run
463+
HOME="$HOME" \
464+
CODEX_HOME="$CODEX_HOME" \
465+
AGENTS_HOME="${AGENTS_HOME:-$HOME/.agents}" \
466+
ECC_GLOBAL_HOOKS_DIR="${ECC_GLOBAL_HOOKS_DIR:-$CODEX_HOME/git-hooks}" \
467+
"$HOOKS_INSTALLER" --dry-run
464468
else
465-
"$HOOKS_INSTALLER"
469+
HOME="$HOME" \
470+
CODEX_HOME="$CODEX_HOME" \
471+
AGENTS_HOME="${AGENTS_HOME:-$HOME/.agents}" \
472+
ECC_GLOBAL_HOOKS_DIR="${ECC_GLOBAL_HOOKS_DIR:-$CODEX_HOME/git-hooks}" \
473+
"$HOOKS_INSTALLER"
466474
fi
467475

468476
log "Running global regression sanity check"
469477
if [[ "$MODE" == "dry-run" ]]; then
470478
printf '[dry-run] %s\n' "$SANITY_CHECKER"
471479
else
472-
"$SANITY_CHECKER"
480+
HOME="$HOME" \
481+
CODEX_HOME="$CODEX_HOME" \
482+
AGENTS_HOME="${AGENTS_HOME:-$HOME/.agents}" \
483+
ECC_GLOBAL_HOOKS_DIR="${ECC_GLOBAL_HOOKS_DIR:-$CODEX_HOME/git-hooks}" \
484+
"$SANITY_CHECKER"
473485
fi
474486

475487
log "Sync complete"

0 commit comments

Comments
 (0)