Fix starship not getting the correct pwd (#1822)

This commit is contained in:
Jonathan Turner 2020-05-17 22:22:54 -07:00 committed by GitHub
parent 6ec6eb5199
commit c475be2df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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);

View File

@ -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
}
_ => {