Skip to content

Commit 477c821

Browse files
committed
fix: correct uv tool bin path and not_found cleanup counting
Use `uv tool bin` instead of broken `uv tool dir/../bin` fallback, and make PATH export consistent with whichever branch fires. Count not_found deployments as successfully cleaned in scheduled-cleanup since a missing deployment is already clean.
1 parent fceb5c1 commit 477c821

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

scheduled-cleanup/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,7 @@ runs:
330330
if [ "$DELETE_RESULT" = "true" ]; then
331331
echo "ZAD deployment '$ENV_NAME' deleted"
332332
elif [ "$DELETE_REASON" = "not_found" ]; then
333-
echo "ZAD deployment '$ENV_NAME' not found (already deleted)"
334-
ENV_SUCCESS=false
333+
echo "ZAD deployment '$ENV_NAME' not found (already clean)"
335334
else
336335
ENV_SUCCESS=false
337336
fi

scripts/zad-common.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ install_zad_cli() {
1818
exit 1
1919
fi
2020
# Ensure uv tool bin directory is on PATH for subsequent steps
21-
UV_TOOL_BIN=$(uv tool dir 2>/dev/null)/../bin
22-
if [ -d "$HOME/.local/bin" ]; then
23-
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
24-
elif [ -n "$UV_TOOL_BIN" ] && [ -d "$UV_TOOL_BIN" ]; then
21+
UV_TOOL_BIN=$(uv tool bin 2>/dev/null || echo "")
22+
if [ -n "$UV_TOOL_BIN" ] && [ -d "$UV_TOOL_BIN" ]; then
2523
echo "$UV_TOOL_BIN" >> "$GITHUB_PATH"
24+
export PATH="$UV_TOOL_BIN:$PATH"
25+
elif [ -d "$HOME/.local/bin" ]; then
26+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
27+
export PATH="$HOME/.local/bin:$PATH"
2628
fi
27-
export PATH="$HOME/.local/bin:$PATH"
2829
if ! command -v zad >/dev/null 2>&1; then
2930
echo "::error::zad-cli installed but 'zad' command not found in PATH"
3031
exit 1

0 commit comments

Comments
 (0)