Skip to content

Commit 9917b3c

Browse files
authored
fix: use RUNNER_TEMP in install-scripts Windows live-mode path (#10)
Windows job's resolve step wrote /tmp/rdbr/install.ps1 to GITHUB_OUTPUT. Git-bash on Windows maps /tmp internally but PowerShell — which runs the test steps — sees the literal path and errors with 'not recognized as the name of a cmdlet, function, script file, or operable program'. Switch to $RUNNER_TEMP which resolves to a Windows-native path (D:\a\_temp) on windows-latest and still works cross-shell. Unix job left alone: /tmp works there and RUNNER_TEMP is just a longer path. Unified change would add noise for zero benefit.
1 parent 302f6d1 commit 9917b3c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/install-scripts.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,16 @@ jobs:
246246
shell: bash
247247
run: |
248248
set -eu
249+
# Windows: use RUNNER_TEMP (Windows-native path) rather than /tmp.
250+
# Git-bash understands /tmp but PowerShell (which runs the test steps)
251+
# doesn't, and a cross-shell handoff needs a path both can open.
252+
TMP="${RUNNER_TEMP}/rdbr"
253+
mkdir -p "$TMP"
249254
if [ "${{ steps.mode.outputs.mode }}" = "live" ]; then
250-
mkdir -p /tmp/rdbr
251-
curl -fsSL --retry 3 --retry-delay 2 https://rendobar.com/install.ps1 -o /tmp/rdbr/install.ps1
252-
curl -fsSL --retry 3 --retry-delay 2 https://rendobar.com/uninstall.ps1 -o /tmp/rdbr/uninstall.ps1
253-
echo "install=/tmp/rdbr/install.ps1" >> "$GITHUB_OUTPUT"
254-
echo "uninstall=/tmp/rdbr/uninstall.ps1" >> "$GITHUB_OUTPUT"
255+
curl -fsSL --retry 3 --retry-delay 2 https://rendobar.com/install.ps1 -o "$TMP/install.ps1"
256+
curl -fsSL --retry 3 --retry-delay 2 https://rendobar.com/uninstall.ps1 -o "$TMP/uninstall.ps1"
257+
echo "install=$TMP/install.ps1" >> "$GITHUB_OUTPUT"
258+
echo "uninstall=$TMP/uninstall.ps1" >> "$GITHUB_OUTPUT"
255259
else
256260
echo "install=${GITHUB_WORKSPACE}/install.ps1" >> "$GITHUB_OUTPUT"
257261
echo "uninstall=${GITHUB_WORKSPACE}/uninstall.ps1" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)