nushell/crates/nu-cmd-base
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
..
src Set current working directory at startup (#12953) 2024-09-25 13:04:26 -05:00
Cargo.toml Bump version to 0.98.1 (#13896) 2024-09-22 12:41:44 +08:00
LICENSE [nu-cmd-base] add missing LICENSE text (#10855) 2023-10-27 15:55:03 -05:00
README.md Add top-level crate documentation/READMEs (#12907) 2024-07-14 10:10:41 +02:00

Utilities used by the different nu-command/nu-cmd-* crates, should not contain any full Command implementations.

Internal Nushell crate

This crate implements components of Nushell and is not designed to support plugin authors or other users directly.