File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -447,7 +447,7 @@ impl<'a> Toolchain<'a> {
447447 LocalToolchainName :: Named ( t) => t,
448448 LocalToolchainName :: Path ( _) => bail ! ( "Cannot remove a path based toolchain" ) ,
449449 } ;
450- match Self :: exists ( cfg, & ( & name) . into ( ) ) ? {
450+ let fs_modified = match Self :: exists ( cfg, & ( & name) . into ( ) ) ? {
451451 true => {
452452 ( cfg. notify_handler ) ( Notification :: UninstallingToolchain ( & name) ) ;
453453 let installed_paths = match & name {
@@ -466,19 +466,22 @@ impl<'a> Toolchain<'a> {
466466 }
467467 }
468468 }
469+ true
469470 }
470471 false => {
471472 // Might be a dangling symlink
472473 if path. is_symlink ( ) {
473474 ( cfg. notify_handler ) ( Notification :: UninstallingToolchain ( & name) ) ;
474475 fs:: remove_dir_all ( & path) ?;
476+ true
475477 } else {
476478 info ! ( "no toolchain installed for '{name}'" ) ;
479+ false
477480 }
478481 }
479- }
482+ } ;
480483
481- if !path. is_symlink ( ) && !path. exists ( ) {
484+ if !path. is_symlink ( ) && !path. exists ( ) && fs_modified {
482485 ( cfg. notify_handler ) ( Notification :: UninstalledToolchain ( & name) ) ;
483486 }
484487 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments