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