build-launcher: pass the layer's flags whole when a path holds a space #380
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!380
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-380"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@erdemcisse on GitHub · 2026-12-01 20:38 UTC · original
erdemcisse:fix/build-launcher-path-with-spaces→main· +6 −2 · 1 files · 72 commits · closed without mergingWhat and why
scripts/build-launcher.ps1 -Packagecannot build the layer when the checkout or the user profile sits under a path with a space in it (C:\Users\John Smith\Downloads\foxhound), reported in #349.cargosplitsRUSTFLAGSat every space and has no quoting, so the two--remap-path-prefixflags and-C target-cpu=x86-64-v3reach the compiler in pieces:which the script reports as
the layer did not build.CARGO_ENCODED_RUSTFLAGScarries the same flags separated by U+001F instead — a character no Windows path can hold — so each flag arrives whole, and nothing changes on a path without spaces (the value is set and removed inside the same block).Tested
No MSVC toolchain on this machine, so the check is the flags the script hands over, with a stand-in
cargothat behaves like the real one (splitsRUSTFLAGSat spaces, splitsCARGO_ENCODED_RUSTFLAGSat U+001F,CARGO_ENCODED_RUSTFLAGSwinning) and passes the result to a realrustc 1.98.1 --print sysroot.Checkout in
...\_pr_work\pr space test\foxhound.Before (this branch's parent, unchanged script):
Real
cargo1.98.1 in the same folder fails the same way (its firstrustcprobe):After (
.\scripts\build-launcher.ps1 -Package, same folder):The run then stops at
Copy-Item ...\target\dist\dist\victory.exebecause the stand-in built nothing — the point of the check is that the build step itself now gets valid flags.[System.Management.Automation.Language.Parser]::ParseFilereports no syntax error in the edited script.Not run here: a full
-Packagebuild (needs MSVC, and the release build is minutes long); a maintainer's run on a normal path is unchanged by this diff, and a run on a spaced path is the case this fixes.GPUs tested: n/a (build script, no GPU involved).
AI-assisted: yes — written and tested with DeepSeek Harness (DeepSeek agent); the diff is one environment assignment and its comment.
Checklist
main(94c3c5f) and merges cleanly.scripts/build-launcher.ps1alone.docs/design.md— n/a, no translator change.Fixes #349.
`cargo build` splits RUSTFLAGS at every space and cannot quote, so with a checkout under `C:\Users\John Smith\Downloads\foxhound` - or a profile whose name holds a space - the compiler is handed `--remap-path-prefix=C:\Users\John` and `Smith=~` separately and stops with error: --remap-path-prefix must contain '=' between FROM and TO which `-Package` reports as "the layer did not build". CARGO_ENCODED_RUSTFLAGS carries the same flags separated by U+001F, a character no path can hold, so each flag reaches the compiler whole. Costs nothing on a path without spaces. Reported in #349.@deltaxdr on GitHub · 2026-12-02 01:37 UTC · original · approved these changes
good work, i've just hit the same problem while debugging
@readmet3xt-lab on GitHub · 2026-12-02 01:48 UTC · original
Thank you, this fixes a real stop for anyone whose checkout or user folder has a space in its path. The same change is in the candidate for the next release and will be credited to you in its notes. We'll close this when that release is published.
Pull request closed