File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -321,13 +321,13 @@ impl<'a> Toolchain<'a> {
321321 }
322322 env_var:: prepend_path ( sysenv:: LOADER_PATH , & new_path, cmd) ;
323323
324- // Append first cargo_home, then toolchain/bin to the PATH
325- let mut path_to_append = Vec :: with_capacity ( 2 ) ;
324+ // Prepend first cargo_home, then toolchain/bin to the PATH
325+ let mut path_to_prepend = PathBuf :: from ( "" ) ;
326326 if let Ok ( cargo_home) = utils:: cargo_home ( ) {
327- path_to_append . push ( cargo_home. join ( "bin" ) ) ;
327+ path_to_prepend . push ( cargo_home. join ( "bin" ) ) ;
328328 }
329- path_to_append . push ( self . path . join ( "bin" ) ) ;
330- env_var:: append_path ( "PATH" , path_to_append , cmd) ;
329+ path_to_prepend . push ( self . path . join ( "bin" ) ) ;
330+ env_var:: prepend_path ( "PATH" , path_to_prepend . as_path ( ) , cmd) ;
331331 }
332332
333333 pub fn doc_path ( & self , relative : & str ) -> Result < PathBuf > {
You can’t perform that action at this time.
0 commit comments