@@ -731,8 +731,8 @@ pub(crate) fn install_proxies(process: &Process) -> Result<()> {
731
731
let mut tool_handles = Vec :: new ( ) ;
732
732
let mut link_afterwards = Vec :: new ( ) ;
733
733
734
- // Try to hardlink all the Rust exes to the rustup exe. Some systems,
735
- // like Android, does not support hardlinks , so we fallback to symlinks .
734
+ // Try to symlink all the Rust exes to the rustup exe. Some systems,
735
+ // like Windows, do not always support symlinks , so we fallback to hard links .
736
736
//
737
737
// Note that this function may not be running in the context of a fresh
738
738
// self update but rather as part of a normal update to fill in missing
@@ -751,7 +751,7 @@ pub(crate) fn install_proxies(process: &Process) -> Result<()> {
751
751
// actually delete files (they'll say they're deleted but they won't
752
752
// actually be on Windows). As a result we manually drop all the
753
753
// `tool_handles` later on. This'll allow us, afterwards, to actually
754
- // overwrite all the previous hard links with new ones.
754
+ // overwrite all the previous soft or hard links with new ones.
755
755
for tool in TOOLS {
756
756
let tool_path = bin_path. join ( format ! ( "{tool}{EXE_SUFFIX}" ) ) ;
757
757
if let Ok ( handle) = Handle :: from_path ( & tool_path) {
@@ -766,7 +766,7 @@ pub(crate) fn install_proxies(process: &Process) -> Result<()> {
766
766
for tool in DUP_TOOLS {
767
767
let tool_path = bin_path. join ( format ! ( "{tool}{EXE_SUFFIX}" ) ) ;
768
768
if let Ok ( handle) = Handle :: from_path ( & tool_path) {
769
- // Like above, don't clobber anything that's already hardlinked to
769
+ // Like above, don't clobber anything that's already linked to
770
770
// avoid extraneous errors from being returned.
771
771
if rustup == handle {
772
772
continue ;
@@ -790,12 +790,12 @@ pub(crate) fn install_proxies(process: &Process) -> Result<()> {
790
790
continue ;
791
791
}
792
792
}
793
- utils:: hard_or_symlink_file ( & rustup_path, & tool_path) ?;
793
+ utils:: symlink_or_hardlink_file ( & rustup_path, & tool_path) ?;
794
794
}
795
795
796
796
drop ( tool_handles) ;
797
797
for path in link_afterwards {
798
- utils:: hard_or_symlink_file ( & rustup_path, & path) ?;
798
+ utils:: symlink_or_hardlink_file ( & rustup_path, & path) ?;
799
799
}
800
800
801
801
Ok ( ( ) )
0 commit comments