File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ use std::borrow::Cow;
3434use std:: env;
3535use std:: env:: consts:: EXE_SUFFIX ;
3636use std:: fs;
37- use std:: path:: { Component , Path , PathBuf } ;
37+ use std:: path:: { Component , Path , PathBuf , MAIN_SEPARATOR } ;
3838use std:: process:: Command ;
3939
4040use same_file:: Handle ;
@@ -959,8 +959,8 @@ fn parse_new_rustup_version(version: String) -> String {
959959
960960pub fn prepare_update ( ) -> Result < Option < PathBuf > > {
961961 let cargo_home = utils:: cargo_home ( ) ?;
962- let rustup_path = cargo_home. join ( & format ! ( "bin/ rustup{}" , EXE_SUFFIX ) ) ;
963- let setup_path = cargo_home. join ( & format ! ( "bin/ rustup-init{}" , EXE_SUFFIX ) ) ;
962+ let rustup_path = cargo_home. join ( & format ! ( "bin{} rustup{}" , MAIN_SEPARATOR , EXE_SUFFIX ) ) ;
963+ let setup_path = cargo_home. join ( & format ! ( "bin{} rustup-init{}" , MAIN_SEPARATOR , EXE_SUFFIX ) ) ;
964964
965965 if !rustup_path. exists ( ) {
966966 return Err ( ErrorKind :: NotSelfInstalled ( cargo_home) . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments