File tree 1 file changed +3
-3
lines changed
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;
34
34
use std:: env;
35
35
use std:: env:: consts:: EXE_SUFFIX ;
36
36
use std:: fs;
37
- use std:: path:: { Component , Path , PathBuf } ;
37
+ use std:: path:: { Component , Path , PathBuf , MAIN_SEPARATOR } ;
38
38
use std:: process:: Command ;
39
39
40
40
use same_file:: Handle ;
@@ -959,8 +959,8 @@ fn parse_new_rustup_version(version: String) -> String {
959
959
960
960
pub fn prepare_update ( ) -> Result < Option < PathBuf > > {
961
961
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 ) ) ;
964
964
965
965
if !rustup_path. exists ( ) {
966
966
return Err ( ErrorKind :: NotSelfInstalled ( cargo_home) . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments