Skip to content

Commit

Permalink
Make rustup-init work when called as rustup-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Apr 14, 2016
1 parent 551634a commit b75b02d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/multirust-cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ fn run_multirust() -> Result<()> {
multirust_mode::main()
}
Some(n) if n.starts_with("multirust-setup")||
n.starts_with("rustup-setup") ||
n.starts_with("rustup-init") => {
// NB: The above check is only for the prefix of the file
// name. Browsers rename duplicates to
Expand Down
12 changes: 12 additions & 0 deletions tests/cli-self-update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,18 @@ fn multirust_still_works_after_update() {
fn update_stress_test() {
}

// The installer used to be called rustup-setup. For compatibility it
// still needs to work in that mode.
#[test]
fn as_rustup_setup() {
update_setup(&|config, _| {
let init = config.exedir.join(format!("rustup-init{}", EXE_SUFFIX));
let setup = config.exedir.join(format!("rustup-setup{}", EXE_SUFFIX));
fs::copy(&init, &setup).unwrap();
expect_ok(config, &["rustup-setup", "-y"]);
});
}

#[test]
fn first_install_exact() {
setup(&|config| {
Expand Down

0 comments on commit b75b02d

Please sign in to comment.