nushell/tests/shell
YizhePKU 13df0af514
Set current working directory at startup (#12953)
This PR sets the current working directory to the location of the
Nushell executable at startup, using `std::env::set_current_dir()`. This
is desirable because after PR
https://github.com/nushell/nushell/pull/12922, we no longer change our
current working directory even after `cd` is executed, and some OS might
lock the directory where Nushell started.

The location of the Nushell executable is chosen because it cannot be
removed while Nushell is running anyways, so we don't have to worry
about OS locking it.

This PR has the side effect that it breaks buggy command even harder.
I'll keep this PR as a draft until these commands are fixed, but it
might be helpful to pull this PR if you're working on fixing one of
those bugs.

---------

Co-authored-by: Devyn Cairns <devyn.cairns@gmail.com>
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-09-25 13:04:26 -05:00
..
environment Respect user-defined $env.NU_LOG_FORMAT and $env.NU_LOG_DATE_FORMAT (#13692) 2024-08-28 07:57:43 -05:00
pipeline Set current working directory at startup (#12953) 2024-09-25 13:04:26 -05:00
mod.rs Improve help output for scripts (#13445) 2024-08-23 21:08:27 +02:00
repl.rs Fix merging child stack into parent (#12426) 2024-04-06 15:03:22 +00:00