2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-03-05 15:58:17 +00:00
nushell/crates/nu-command/tests
Devyn Cairns 709b2479d9
Fix trailing slash in PWD set by cd ()
# Description

Fixes .

 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
..
commands Fix trailing slash in PWD set by cd () 2024-05-04 12:38:37 +03:00
format_conversions Avoid taking unnecessary ownership of intermediates () 2024-05-04 00:53:15 +00:00
main.rs ♻️ rework some help strings () 2024-03-27 08:41:02 -05:00