Skip to content

Commit a16e6de

Browse files
committed
ci, round 5 follow-up: address xlings by absolute path in the bootstrap fast-path; bare xlings.exe failed on Git Bash for Windows because MSYS re-derives PATH from the Windows environment on every child shell and drops the mixed-separator entry the export PATH writes. xlings self install would write it back via [Environment]::SetEnvironmentVariable, but the fast path skips that step. $XL_BIN_PATH is the same path the cold path uses; install_pinned_mcpp.sh carries the same note.
Found by round 5's first build-windows, failed with `xlings.exe: command not found` at line 11 (the bare call).
1 parent 59a4f01 commit a16e6de

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

‎.github/actions/bootstrap-mcpp/action.yml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ runs:
149149
if [ -n "$xl_ver" ] && echo "$xl_ver" | grep -qF "$XLINGS_VERSION"; then
150150
export PATH="$HOME/.xlings/subos/default/bin:$PATH"
151151
echo "$HOME/.xlings/subos/default/bin" >> "$GITHUB_PATH"
152-
xlings --version
152+
"$XL_BIN_PATH" --version
153153
MCPP=$(bash "$REPO_DIR/.github/tools/install_pinned_mcpp.sh" "$REPO_DIR")
154-
echo "system xlings: $(xlings --version 2>/dev/null | head -1)"
154+
echo "system xlings: $("$XL_BIN_PATH" --version 2>/dev/null | head -1)"
155155
if [ -x "$HOME/.mcpp/registry/bin/xlings" ]; then
156156
echo "sandbox xlings: $("$HOME/.mcpp/registry/bin/xlings" --version 2>/dev/null | head -1)"
157157
else
@@ -236,15 +236,23 @@ runs:
236236
# FAST PATH: see the unix leg for the reasoning. The cost on Windows is
237237
# larger (the zip is bigger and the runner's network path to
238238
# github.com is slower), measured at ~30 s per job.
239+
#
240+
# The fast path addresses xlings by ABSOLUTE PATH, not by bare
241+
# `xlings.exe`. The cold path runs `xlings self install` first, which
242+
# writes the dir into Windows PATH via `[Environment]::SetEnvironmentVariable`;
243+
# without that step a bare `xlings.exe` call depends on the bash
244+
# export PATH, which Git Bash re-derives from Windows on every child
245+
# shell and drops the mixed-separator entry. install_pinned_mcpp.sh
246+
# carries the same note.
239247
XL_BIN_PATH="$USERPROFILE/.xlings/subos/default/bin/xlings.exe"
240248
if [ -x "$XL_BIN_PATH" ]; then
241249
xl_ver="$("$XL_BIN_PATH" --version 2>/dev/null | head -1 || true)"
242250
if [ -n "$xl_ver" ] && echo "$xl_ver" | grep -qF "$XLINGS_VERSION"; then
243251
export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
244252
echo "$USERPROFILE/.xlings/subos/default/bin" >> "$GITHUB_PATH"
245-
xlings.exe --version
253+
"$XL_BIN_PATH" --version
246254
MCPP=$(bash "$REPO_DIR/.github/tools/install_pinned_mcpp.sh" "$REPO_DIR")
247-
echo "system xlings: $(xlings.exe --version 2>/dev/null | head -1)"
255+
echo "system xlings: $("$XL_BIN_PATH" --version 2>/dev/null | head -1)"
248256
if [ -x "$USERPROFILE/.mcpp/registry/bin/xlings.exe" ]; then
249257
echo "sandbox xlings: $("$USERPROFILE/.mcpp/registry/bin/xlings.exe" --version 2>/dev/null | head -1)"
250258
else

0 commit comments

Comments
 (0)