diff --git a/scripts/clawdock/clawdock-helpers.sh b/scripts/clawdock/clawdock-helpers.sh index 6ee5104b928d..5b79015bff0a 100755 --- a/scripts/clawdock/clawdock-helpers.sh +++ b/scripts/clawdock/clawdock-helpers.sh @@ -122,7 +122,7 @@ _clawdock_ensure_dir() { fi # Auto-detect from common paths - local candidate found_path="" + local candidate found_path="" response for candidate in "${CLAWDOCK_COMMON_PATHS[@]}"; do if [[ -f "${candidate}/docker-compose.yml" ]]; then found_path="$candidate" diff --git a/test/scripts/clawdock-helpers.test.ts b/test/scripts/clawdock-helpers.test.ts index 9fab0258b4a5..b6f9feb29f3b 100644 --- a/test/scripts/clawdock-helpers.test.ts +++ b/test/scripts/clawdock-helpers.test.ts @@ -42,10 +42,12 @@ describe("scripts/clawdock/clawdock-helpers.sh", () => { [ 'path_before="$PATH"', 'candidate="caller-value"', + 'response="caller-response"', "source scripts/clawdock/clawdock-helpers.sh || exit 1", '_clawdock_ensure_dir < "$CLAWDOCK_CONFIRM_FILE" || exit 1', '[[ "$PATH" == "$path_before" ]] || exit 1', '[[ "$candidate" == "caller-value" ]] || exit 1', + '[[ "$response" == "caller-response" ]] || exit 1', '[[ "$CLAWDOCK_DIR" == "$HOME/openclaw" ]] || exit 1', ].join("\n"), ],