From f2481059aeb17c5ed095cdc4e25fb7b21e2741c7 Mon Sep 17 00:00:00 2001 From: soul Date: Wed, 25 Nov 2026 20:46:58 +0100 Subject: [PATCH] Release workflow: quote Git Bash shell pin, put Git bin first on PATH, preflight bash resolution Co-Authored-By: Claude Sonnet 5.5 --- .forgejo/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 61fee25e1..dac57947a 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -22,14 +22,24 @@ jobs: BUILD_NAME: release-${{ github.run_id }} defaults: run: - shell: 'C:\Program Files\Git\bin\bash.exe -e {0}' + shell: '"C:/Program Files/Git/bin/bash.exe" -e {0}' steps: + # The composite forgejo-release action runs its steps with `shell: bash`, resolved through PATH, where System32's WSL + # bash.exe can win. Git's bin goes first for every later step of this job. + - name: Put Git Bash first on PATH + run: printf '%s\n' 'C:\Program Files\Git\bin' >> "$GITHUB_PATH" + - name: Preflight host prerequisites env: RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} run: | set -u missing="" + first_bash="$(cmd.exe //c where bash 2>/dev/null | head -n 1 | tr -d '\r')" + case "${first_bash//\//}" in + "C:/Program Files/Git/"*) ;; + *) missing="$missing"$'\n'" PATH resolves bash to '$first_bash', not Git Bash (the forgejo-release action would run WSL bash)" ;; + esac note() { missing="$missing"$'\n'" $1"; } for tool in jq curl knope git tar dotnet; do command -v "$tool" >/dev/null || note "$tool is not on PATH"