fix(cli): keep SLUG accessible to cleanup_all EXIT trap
cmd_start declared SLUG as local, but cleanup_all (registered as the EXIT/INT/TERM trap) calls pipelock_stop "$SLUG" after cmd_start has returned and the local is out of scope. With set -u this aborted shell teardown with "SLUG: unbound variable". Drop the local to match the convention already used for MANIFEST_FILE, CONTAINER, and STAGE_DIR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -285,7 +285,7 @@ cmd_start() {
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local SLUG
|
# Not declared local: needed by cleanup_all after cmd_start returns (see MANIFEST_FILE note below).
|
||||||
SLUG="$(slugify "$NAME")"
|
SLUG="$(slugify "$NAME")"
|
||||||
|
|
||||||
local IMAGE="${CLAUDE_BOTTLE_IMAGE:-claude-bottle:latest}"
|
local IMAGE="${CLAUDE_BOTTLE_IMAGE:-claude-bottle:latest}"
|
||||||
|
|||||||
Reference in New Issue
Block a user