fix(rustup): discover rustup at $CARGO_HOME/bin/rustup#1005
Merged
Conversation
soldr-managed rustup-init installs rustup at \`<paths.root>/cargo/bin/rustup\` (the minimal-profile install path). The bootstrap *also* copies the binary to \`<paths.bin>/rustup\` for discoverability, but a fresh \`soldr toolchain ensure\` from a previous session can leave only the cargo/bin/ copy. Without this fix, \`discover_rustup()\` misses the cargo/bin/ install and \`soldr prepare\` (and any other command that uses the cheap discovery path) falls back to literal \`"rustup"\` on PATH — which fails on a fresh container where PATH was never updated to include \`<paths.root>/cargo/bin\`. Symptom: \`soldr prepare\` prints \`warning: rustup target add failed: rustup target add: No such file or directory (os error 2)\` even though rustup is installed in soldr's managed dir. Repro: clean docker (no PATH-side rustup), then \`soldr toolchain ensure && soldr prepare --target aarch64-apple-darwin\`. Surfaced while validating the FastLED/fbuild Linux → mac-arm64 cross-compile docker harness. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Surfaced while validating the FastLED/fbuild Linux → mac-arm64 cross-compile docker harness (FastLED/fbuild#771).
soldr preparewas warningrustup target add failed: rustup target add: No such file or directoryeven though rustup was installed in the soldr-managed dir.Root cause:
discover_rustup()checks<paths.bin>/rustupbut the rustup-init minimal-profile install actually puts rustup at<paths.root>/cargo/bin/rustup. The bootstrap copies the binary to<paths.bin>/after install for fast discovery, but a freshsoldr toolchain ensurefrom a previous session can leave only the cargo/bin/ copy.Fix: add the cargo/bin/ path as a third fallback in
discover_rustup.