@@ -27,14 +27,14 @@ impl Tool {
27
27
///
28
28
/// The current implementation checks three places for an executable to use:
29
29
/// 1) `$CARGO_HOME/bin/<executable_name>`
30
- /// where $CARGO_HOME defaults to ~/.cargo (see <https://doc.rust-lang.org/cargo/guide/cargo-home.html>)
31
- /// example: for cargo, this tries $CARGO_HOME/bin/cargo, or ~/.cargo/bin/cargo if $CARGO_HOME is unset.
32
- /// It seems that this is a reasonable place to try for cargo, rustc, and rustup
30
+ /// where $CARGO_HOME defaults to ~/.cargo (see <https://doc.rust-lang.org/cargo/guide/cargo-home.html>)
31
+ /// example: for cargo, this tries $CARGO_HOME/bin/cargo, or ~/.cargo/bin/cargo if $CARGO_HOME is unset.
32
+ /// It seems that this is a reasonable place to try for cargo, rustc, and rustup
33
33
/// 2) Appropriate environment variable (erroring if this is set but not a usable executable)
34
- /// example: for cargo, this checks $CARGO environment variable; for rustc, $RUSTC; etc
34
+ /// example: for cargo, this checks $CARGO environment variable; for rustc, $RUSTC; etc
35
35
/// 3) $PATH/`<executable_name>`
36
- /// example: for cargo, this tries all paths in $PATH with appended `cargo`, returning the
37
- /// first that exists
36
+ /// example: for cargo, this tries all paths in $PATH with appended `cargo`, returning the
37
+ /// first that exists
38
38
/// 4) If all else fails, we just try to use the executable name directly
39
39
pub fn prefer_proxy ( self ) -> Utf8PathBuf {
40
40
invoke ( & [ cargo_proxy, lookup_as_env_var, lookup_in_path] , self . name ( ) )
@@ -44,14 +44,14 @@ impl Tool {
44
44
///
45
45
/// The current implementation checks three places for an executable to use:
46
46
/// 1) Appropriate environment variable (erroring if this is set but not a usable executable)
47
- /// example: for cargo, this checks $CARGO environment variable; for rustc, $RUSTC; etc
47
+ /// example: for cargo, this checks $CARGO environment variable; for rustc, $RUSTC; etc
48
48
/// 2) $PATH/`<executable_name>`
49
- /// example: for cargo, this tries all paths in $PATH with appended `cargo`, returning the
50
- /// first that exists
49
+ /// example: for cargo, this tries all paths in $PATH with appended `cargo`, returning the
50
+ /// first that exists
51
51
/// 3) `$CARGO_HOME/bin/<executable_name>`
52
- /// where $CARGO_HOME defaults to ~/.cargo (see <https://doc.rust-lang.org/cargo/guide/cargo-home.html>)
53
- /// example: for cargo, this tries $CARGO_HOME/bin/cargo, or ~/.cargo/bin/cargo if $CARGO_HOME is unset.
54
- /// It seems that this is a reasonable place to try for cargo, rustc, and rustup
52
+ /// where $CARGO_HOME defaults to ~/.cargo (see <https://doc.rust-lang.org/cargo/guide/cargo-home.html>)
53
+ /// example: for cargo, this tries $CARGO_HOME/bin/cargo, or ~/.cargo/bin/cargo if $CARGO_HOME is unset.
54
+ /// It seems that this is a reasonable place to try for cargo, rustc, and rustup
55
55
/// 4) If all else fails, we just try to use the executable name directly
56
56
pub fn path ( self ) -> Utf8PathBuf {
57
57
invoke ( & [ lookup_as_env_var, lookup_in_path, cargo_proxy] , self . name ( ) )
0 commit comments