nushell/crates/nu-path
Devyn Cairns 709b2479d9
Fix trailing slash in PWD set by cd (#12760)
# 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`
2024-05-04 12:38:37 +03:00
..
fuzz Path expansion no longer removes trailing slashes (#12662) 2024-05-01 17:28:54 -05:00
src Fix trailing slash in PWD set by cd (#12760) 2024-05-04 12:38:37 +03:00
Cargo.toml Bump version to 0.93.1 (#12710) 2024-05-01 17:19:20 -05:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

nu-path

This crate takes care of path handling in Nushell, such as canonicalization and component expansion, as well as other path-related utilities.