mirror of
https://github.com/nushell/nushell.git
synced 2025-07-16 14:25:17 +02:00
# Description Fixes #12758. #12662 introduced a bug where calling `cd` with a path with a trailing slash would cause `PWD` to be set to a path including a trailing slash, which is not allowed. This adds a helper to `nu_path` to remove this, and uses it in the `cd` command to clean it up before setting `PWD`. # Tests + Formatting I added some tests to make sure we don't regress on this in the future. - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib`
14 lines
397 B
Rust
14 lines
397 B
Rust
mod assert_path_eq;
|
|
mod components;
|
|
pub mod dots;
|
|
pub mod expansions;
|
|
mod helpers;
|
|
mod tilde;
|
|
mod trailing_slash;
|
|
|
|
pub use components::components;
|
|
pub use expansions::{canonicalize_with, expand_path_with, expand_to_real_path, locate_in_dirs};
|
|
pub use helpers::{config_dir, config_dir_old, home_dir};
|
|
pub use tilde::expand_tilde;
|
|
pub use trailing_slash::{has_trailing_slash, strip_trailing_slash};
|