mirror of
https://github.com/nushell/nushell
synced 2025-01-15 22:54:16 +00:00
Fix starship not getting the correct pwd (#1822)
This commit is contained in:
parent
6ec6eb5199
commit
c475be2df8
2 changed files with 2 additions and 0 deletions
|
@ -592,6 +592,7 @@ pub async fn cli(
|
||||||
#[cfg(feature = "starship-prompt")]
|
#[cfg(feature = "starship-prompt")]
|
||||||
{
|
{
|
||||||
std::env::set_var("STARSHIP_SHELL", "");
|
std::env::set_var("STARSHIP_SHELL", "");
|
||||||
|
std::env::set_var("PWD", &cwd);
|
||||||
let mut starship_context =
|
let mut starship_context =
|
||||||
starship::context::Context::new_with_dir(clap::ArgMatches::default(), cwd);
|
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()) {
|
let path = match canonicalize(self.path(), pathbuf.as_path()) {
|
||||||
Ok(path) => {
|
Ok(path) => {
|
||||||
let _ = std::env::set_current_dir(&path);
|
let _ = std::env::set_current_dir(&path);
|
||||||
|
std::env::set_var("PWD", &path);
|
||||||
path
|
path
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Reference in a new issue