File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -914,25 +914,23 @@ async fn update(
914
914
cfg. set_default ( Some ( & desc. into ( ) ) ) ?;
915
915
}
916
916
}
917
- if self_update {
918
- exit_code &= common:: self_update ( cfg. process ) . await ?;
919
- }
920
917
} else if ensure_active_toolchain {
921
918
let ( toolchain, reason) = cfg. ensure_active_toolchain ( force_non_host, true ) . await ?;
922
919
info ! ( "the active toolchain `{toolchain}` has been installed" ) ;
923
920
info ! ( "it's active because: {reason}" ) ;
924
921
} else {
925
922
exit_code &= common:: update_all_channels ( cfg, opts. force ) . await ?;
926
- if self_update {
927
- exit_code &= common:: self_update ( cfg. process ) . await ?;
928
- }
929
-
930
923
info ! ( "cleaning up downloads & tmp directories" ) ;
931
924
utils:: delete_dir_contents_following_links ( & cfg. download_dir ) ;
932
925
cfg. tmp_cx . clean ( ) ;
933
926
}
934
927
935
- check_rustup_update ( self_update_mode, false , cfg) . await ?;
928
+ if self_update && !ensure_active_toolchain {
929
+ exit_code &= common:: self_update ( cfg. process ) . await ?;
930
+ } else {
931
+ check_rustup_update ( self_update_mode, false , cfg) . await ?;
932
+ }
933
+
936
934
Ok ( exit_code)
937
935
}
938
936
You can’t perform that action at this time.
0 commit comments