File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ mod topical_doc;
31
31
32
32
use crate :: errors:: * ;
33
33
use rustup:: env_var:: RUST_RECURSION_COUNT_MAX ;
34
+ use rustup:: utils:: utils;
34
35
35
36
use std:: env;
36
37
use std:: path:: PathBuf ;
@@ -60,6 +61,11 @@ fn run_rustup_inner() -> Result<()> {
60
61
// bugs in rustup.
61
62
do_recursion_guard ( ) ?;
62
63
64
+ // Before we do anything else, ensure we know where we are and who we
65
+ // are because otherwise we cannot proceed usefully.
66
+ utils:: current_dir ( ) ?;
67
+ utils:: current_exe ( ) ?;
68
+
63
69
// The name of arg0 determines how the program is going to behave
64
70
let arg0 = match env:: var ( "RUSTUP_FORCE_ARG0" ) {
65
71
Ok ( v) => Some ( v) ,
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ error_chain! {
32
32
33
33
errors {
34
34
LocatingWorkingDir {
35
- description( "could not locate working directory" )
35
+ description( "Unable to proceed. Could not locate working directory. " )
36
36
}
37
37
ReadingFile {
38
38
name: & ' static str ,
@@ -177,9 +177,6 @@ error_chain! {
177
177
description( "failed to set permissions" )
178
178
display( "failed to set permissions for '{}'" , path. display( ) )
179
179
}
180
- GettingCwd {
181
- description( "couldn't get current working directory" )
182
- }
183
180
CargoHome {
184
181
description( "couldn't find value of CARGO_HOME" )
185
182
}
You can’t perform that action at this time.
0 commit comments