File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -382,9 +382,9 @@ macro_rules! post_install_msg_unix_source_env {
382
382
the corresponding `env` file under {cargo_home}.
383
383
384
384
This is usually done by running one of the following (note the leading DOT):
385
- . "{cargo_home}/env" # For sh/bash/zsh/ash/dash/pdksh
386
- source "{cargo_home}/env.fish" # For fish
387
- source "{cargo_home} /env.nu" # For nushell
385
+ . "{cargo_home}/env" # For sh/bash/zsh/ash/dash/pdksh
386
+ source "{cargo_home}/env.fish" # For fish
387
+ source $"($nu.home-path)/.cargo /env.nu" # For nushell
388
388
"#
389
389
} ;
390
390
}
Original file line number Diff line number Diff line change 26
26
use std:: borrow:: Cow ;
27
27
use std:: path:: PathBuf ;
28
28
29
- use anyhow:: { Result , bail } ;
29
+ use anyhow:: { bail , Result } ;
30
30
31
31
use super :: utils;
32
32
use crate :: process:: Process ;
@@ -299,7 +299,8 @@ impl UnixShell for Nu {
299
299
}
300
300
301
301
fn source_string ( & self , process : & Process ) -> Result < String > {
302
- Ok ( format ! ( r#"source "{}/env.nu""# , cargo_home_str( process) ?) )
302
+ let cargo_home_nushell = ( cargo_home_str ( process) ?) . replace ( "$HOME" , "($nu.home-path)" ) ;
303
+ Ok ( format ! ( r#"source $"{}/env.nu""# , cargo_home_nushell) )
303
304
}
304
305
}
305
306
You can’t perform that action at this time.
0 commit comments