File tree Expand file tree Collapse file tree
native_toolchain_rust/lib/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ extension InvokeRustup on ProcessRunner {
5353 String ? workingDirectory,
5454 Map <String , String >? environment,
5555 }) async {
56- late ProcessException lastException;
56+ final failureReasons = < String > [];
57+ ProcessException ? firstFailure;
58+
5759 for (final executable in _rustupExecutables) {
5860 try {
5961 return await invoke (
@@ -63,15 +65,16 @@ extension InvokeRustup on ProcessRunner {
6365 environment: environment,
6466 );
6567 } on ProcessException catch (e) {
66- lastException = e;
68+ firstFailure ?? = e;
69+ failureReasons.add ('"$executable " (${e .message })' );
6770 }
6871 }
6972
7073 throw RustProcessException (
7174 'Failed to invoke rustup; is it installed? '
72- 'Checked the following paths: $ _rustupExecutables . '
75+ 'Tried ${ failureReasons . join ( ', ' )} . '
7376 'For help installing rust, see https://rustup.rs' ,
74- inner: lastException ,
77+ inner: firstFailure ,
7578 );
7679 }
7780}
You can’t perform that action at this time.
0 commit comments