From 315b7777f8ab839e61712089cb99f03c16088be6 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 17:07:17 +0000 Subject: [PATCH] fix: Bare \`cd\` in smoke test permanently changes shell working directory (#877) Co-Authored-By: Claude Sonnet 4.6 --- scripts/harb-evaluator/red-team-sweep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/harb-evaluator/red-team-sweep.sh b/scripts/harb-evaluator/red-team-sweep.sh index 3b23826..a41b9e2 100755 --- a/scripts/harb-evaluator/red-team-sweep.sh +++ b/scripts/harb-evaluator/red-team-sweep.sh @@ -54,7 +54,7 @@ cp "$OPT_SOL" "${OPT_SOL}.sweep-backup" trap 'cp "${OPT_SOL}.sweep-backup" "$OPT_SOL" 2>/dev/null; rm -f "${OPT_SOL}.sweep-backup"' EXIT bash "$INJECT" "$SMOKE_SEED" "$OPT_SOL" || die "Smoke test inject failed for $SMOKE_NAME" -cd "$REPO_ROOT/onchain" && forge build --silent 2>&1 || die "Smoke test compile failed for $SMOKE_NAME" +(cd "$REPO_ROOT/onchain" && forge build --silent 2>&1) || die "Smoke test compile failed for $SMOKE_NAME" cp "${OPT_SOL}.sweep-backup" "$OPT_SOL" log "Smoke test passed ✓"