-
Notifications
You must be signed in to change notification settings - Fork 894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can we rely on proxy mode being based on argv[0]? #1293
Comments
If you're always specifying the toolchain, could you just use |
I didn’t realize |
Ah, |
SimonSapin
added a commit
to SimonSapin/rustup.rs
that referenced
this issue
Nov 21, 2017
bors
added a commit
that referenced
this issue
Nov 22, 2017
Add `rustup run --install` This fixes #1293. See discussion there.
mattico
pushed a commit
to mattico/rustup.rs
that referenced
this issue
Apr 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We’re considering replacing Servo’s rust/cargo bootstrapping code with rustup.rs: servo/servo#11361
My tentative plan is to always use rustup, and run it with a
RUSTUP_TOOLCHAIN
environment variable that selects the appropriate date nightly or versioned stable. However we’d want to make sure we runcargo
through rustup.rs’s proxy, and not run directly a plain Cargo that would ignoreRUSTUP_TOOLCHAIN
and use a rustc that might not be the appropriate version. (Which would likely cause a confusing build error later on.)So, to do that we’d start it from Python with something like
subprocess.Popen(["cargo"] + cargo_args, executable="rustup")
. (And similarly forrustc
,rustdoc
, etc.) This makes Python look for an executable in$PATH
namedrustup
, and execute it withargv[0] == "cargo"
.So this all relies on what’s probably an implementation detail of rustup.rs: the proxy executable installed at
$CARGO_HOME/bin/cargo
is exactly the same as$CARGO_HOME/bin/rustup
, and they behave differently based onargv[0]
.Is this a bad idea? Is there a better way? Or does it sound fine to rely on running
rustup
with a differentargv[0]
triggering proxy mode?The text was updated successfully, but these errors were encountered: