Commit Graph

96 Commits

Author SHA1 Message Date
Benjamin Chen
3e7c66f6de Add toolchain override support on command line 2019-10-22 19:48:02 -04:00
Julian Tescher
e3588b20aa Fix small typos 2019-10-12 15:15:34 -07:00
Benjamin Chen
d0b5b8b22b Support --toolchain option to rustup which
Update code format by cargo fmt for cli-misc.rs

Test both windows and non-windows which() in cli-misc.rs
2019-09-30 00:32:45 -04:00
Jon Gjengset
1b647884f6 Correctly handle update across missing nightlies
Fixes #2001.
2019-09-18 08:29:12 -04:00
Jon Gjengset
4e8bcf5ca5 Make it clearer what each Scenario enables 2019-09-17 14:17:21 -04:00
Jon Gjengset
461bcb1b69 Test that we skip missing nightlies 2019-09-17 10:45:31 -04:00
Jon Gjengset
67c73105a0 Update to most recent viable nightly
Previously, if the user had components installed on `nightly` which were
not available for the latest nightly, `rustup update` would not update
the user's nightly at all. With this patch, rustup will try
progressively older nightlies until it finds a nightly that supports all
the components the user has installed for their current nightly.

Fixes #1628.
Makes progress towards #1501.
Fixes the underlying issue in #1676.
2019-09-17 10:45:31 -04:00
Nick Cameron
ec6d1afcbe Installation profiles (#1673)
* Add profile argument to rustup install

* Address some warnings

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Review changes

Signed-off-by: Nick Cameron <nrc@ncameron.org>
2019-09-12 09:10:04 +12:00
Lzu Tao
c104e3b6b9 Replace tempdir with tempfile 2019-07-29 11:10:32 +12:00
Filip (Glamhoth) Demski
44d1f83c45 Testing no default toolchain configured 2019-04-23 13:06:28 +02:00
Lzu Tao
71178b4aa1 clippy: Fix toplevel_ref_arg 2019-04-20 00:22:47 +07:00
Lzu Tao
58b18a650d clippy: Fix single_char_pattern 2019-04-20 00:22:47 +07:00
Daniel Silverstone
928e7688c5 errors: Reorder and reword component-unavailable message parts
The ordering of some of the parts of the component-unavailable
error message was unfortunate, resulting in confusion.  This
reorders those so that errors are slightly clearer.  In addition
we reword the explanatory text slightly to improve clarity further

Fixes: #1768

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-04-16 11:53:03 +01:00
Daniel Silverstone
f92aac5f6b Merge pull request #1749 from lzutao/dumbterm
Add test for dumb terminal
2019-04-14 17:01:46 +01:00
Daniel Silverstone
ed08330b0e Merge pull request #1646 from yodaldevoid/shell-completions
Shell completions for Cargo
2019-04-14 16:52:34 +01:00
Lzu Tao
e973520d08 Add test for dumb terminal 2019-04-13 21:03:53 +07:00
Nick Cameron
c40b04f365 Merge pull request #1719 from dwijnand/merge-errors
Merge utils+dist errors into rustup errors
2019-04-02 12:57:43 +13:00
Gabriel Smith
0312b11cfe test: Added tests for shell completion script support 2019-03-30 03:45:05 -04:00
Dale Wijnand
961d91dc85 Merge dist errors into base 2019-03-17 19:03:32 +00:00
Dale Wijnand
91af98b610 Remove old multirust & compat code 2019-03-16 21:56:22 +00:00
Dale Wijnand
2572d208c1 Unnest rustup's utils crate 2019-03-14 21:53:02 +00:00
Dale Wijnand
432c29ebb5 Unnest rustup's dist crate 2019-03-14 21:52:30 +00:00
Dale Wijnand
f84b79f8b4 Remove telemetry 2019-02-10 10:21:59 +00:00
Nick Cameron
7701ec1493 Merge pull request #1619 from In-line/better-error-message
Better error message for missing binary
2019-02-10 21:00:29 +13:00
Dale Wijnand
0857a9f239 Upgrade to Rust 2018 edition idioms 2019-02-08 07:17:03 +01:00
Alik Aslanyan
2da31be3fe Better error message for missing binary 2019-01-25 19:33:36 +04:00
Andy Russell
ae1ca03c31 allow non-utf8 arguments in proxies 2019-01-11 16:06:22 -05:00
Nick Cameron
fda7cb942b fixup tests 2019-01-09 15:23:42 +13:00
Nick Cameron
79c0312feb Address FIXME in test 2019-01-09 08:41:00 +13:00
Hirokazu Hata
cec8cbb0b9 cargo fmt 2019-01-07 18:45:51 +09:00
Hirokazu Hata
b14faa4141 Add more detail error messages when installing with some components has failed 2019-01-07 18:25:49 +09:00
Daniel Silverstone
7a8c953ead Reformat entire codebase using cargo fmt
To make sure that people using editors which use rustfmt by default
on saving don't touch more lines than intended when working on the
rustup codebase, we'll take the hit to format it all once.
2018-12-20 20:20:24 +00:00
Nick Cameron
8f547c2f42 Fix rename_rls_remove test on Windows 2018-12-06 11:39:37 -08:00
Nick Cameron
1cd1e01374 Use renames instead of rename to match the actual manifest 2018-11-27 21:14:14 +13:00
Nick Cameron
5645cf547a Give a better error message if a component is not installed 2018-11-22 09:38:49 +13:00
Nick Cameron
db517e48d9 Add tests 2018-11-22 09:38:49 +13:00
Nick Cameron
35e1a9e28c Fix tests 2018-11-22 09:38:49 +13:00
Cyryl Płotnicki
c0d9b9bb0f Obey rustfmt
Reformatted the code using cargo fmt.
2018-04-10 19:35:26 +01:00
kennytm
016bf5676a Prevent rustup update to a toolchain without rustc or cargo.
When the Rust CI is misconfigured, it is possible to produce a nightly
where `rustc` or `cargo` is not available. This makes the entire toolchain
unusable (for one day at least).

This PR tries to prevent the update operation from starting at all if
these essential components are missing, so the user would still have a
working though outdated toolchain.

Resolves #1297.
2017-12-02 00:19:48 +08:00
Simon Sapin
9d095e2d9a Add rustup run --install, fix #1293 2017-11-21 13:08:27 +01:00
Nick Cameron
2f02956d62 Integration tests 2017-08-28 11:29:09 +12:00
Ralf Jung
984c997c71 test removing dangling symlink toolchains 2017-08-12 15:18:04 -07:00
Alex Crichton
da59c7ee34 Allow tests to run in parallel
This commit edits tests to allow tests to run in parallel instead of taking
global locks. This works by avoiding `env::set_current_dir` and instead tracking
the current directory in the `Config` structure, where all child processes get
an updated cwd.
2017-08-10 20:10:29 -07:00
Brian Anderson
84616eff0b Merge pull request #705 from meqif/check-for-unexpected-cargo-rustc-before-install
Check for unexpected cargo/rustc before install
2017-06-23 19:21:37 -07:00
Ricardo Martins
774d0c0c5d Check for unexpected cargo/rustc before install
If RUSTUP_INIT_SKIP_PATH_CHECK is set to "yes", ignore the PATH checks
for rustc and cargo. The variable is set to "yes" by default in
clitools::env, and overriden in the relevant tests.

Fixes #681
2017-06-10 13:22:37 +01:00
Diggory Blake
009239dd52 Rename references to multirust to rustup where applicable 2017-06-03 16:01:45 +01:00
theindigamer
bd7c369e18 Fixes failing tests.
* Rearranges error-checking in `install_from_dir` to pass the tests
  `custom_invalid_names` and `custom_invalid_names_with_archive_dates`.
* Adds subdirectory `lib` to custom directories to pass the tests
  `custom_toolchain_cargo_fallback_proxy` and
  `custom_toolchain_cargo_fallback_run`.
* Changed `emptydir` to `customdir.join("custom-1") to avoid directory
  structure error and pass `rustup_failed_search_path`.
2017-04-26 13:46:18 -04:00
bors
55ea19ad6a Auto merge of #1005 - brson:rls, r=Diggsey
RLS support

I think this is sufficient for basic support.

With this PR, rustup will create 'rls' proxies in CARGO_HOME/bin, and will do so lazily when that binary doesn't exist.

After this PR one can write

```
rustup component add rls
rustup component add rust-src
rustup component add rust-analysis
```

to get a working RLS, assuming the 'rls' package is deployed.

Next steps are to make `rustup component` accept multiple components, so RLS can be installed with just `rustup compnent add rls rust-src rust-analysis` (cc @durka).

I'd suggest that RLS have nice error handling for cases where rust-src and rust-analysis aren't available. It might suggest running the proper rustup commands.

rustup probably needs to emit a better error message when somebody tries to run `rls` without installing it. Since the proxy always exists, it will say something like "the binary 'rls' doesn't exist in toolchain X". It would be better for rustup to know which package contains 'rls' and say so.

cc @nrc @jonathandturner
2017-03-28 02:41:58 +00:00
Daniel Lockyer
d50461fba0 Remove unnecessary reference 2017-03-26 11:25:43 +01:00
Daniel Lockyer
07640d9fe1 Switch to more specific assert macros 2017-03-26 11:23:40 +01:00