mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
Fix starship not getting the correct pwd (#1822)
This commit is contained in:
parent
6ec6eb5199
commit
c475be2df8
@ -592,6 +592,7 @@ pub async fn cli(
|
||||
#[cfg(feature = "starship-prompt")]
|
||||
{
|
||||
std::env::set_var("STARSHIP_SHELL", "");
|
||||
std::env::set_var("PWD", &cwd);
|
||||
let mut starship_context =
|
||||
starship::context::Context::new_with_dir(clap::ArgMatches::default(), cwd);
|
||||
|
||||
|
@ -648,6 +648,7 @@ impl Shell for FilesystemShell {
|
||||
let path = match canonicalize(self.path(), pathbuf.as_path()) {
|
||||
Ok(path) => {
|
||||
let _ = std::env::set_current_dir(&path);
|
||||
std::env::set_var("PWD", &path);
|
||||
path
|
||||
}
|
||||
_ => {
|
||||
|
Loading…
Reference in New Issue
Block a user