Error throws when changing directory to root folder of a Windows drive without trailing backslash #13091
Open
Description
Describe the bug
There are two issues:
- There will be an error when cd to
c:
,d:
etc., and the working directory does not change. Error message: "Error: Cannot set $env.PWD to a non-absolute path" - When
cd
to another directory, the driver letter is not changed to upper case if the drive letter in the given path is in lower case. Traditionally, drive letters are displayed in upper case, it is a little strange to see lowercase drive letters in the command prompt.
How to reproduce
cd d:
cd d:\
cd D:\
Expected behavior
I expected nu to deal with paths like d:
correctly, and to always display uppercase drive letters in the command prompt.
Screenshots
No response
Configuration
key | value |
---|---|
version | 0.94.2 |
major | 0 |
minor | 94 |
patch | 2 |
branch | |
commit_hash | be8c1dc |
build_os | windows-x86_64 |
build_target | x86_64-pc-windows-msvc |
rust_version | rustc 1.77.2 (25ef9e3d8 2024-04-09) |
rust_channel | 1.77.2-x86_64-pc-windows-msvc |
cargo_version | cargo 1.77.2 (e52e36006 2024-03-26) |
build_time | 2024-06-03 19:27:44 +00:00 |
build_rust_channel | release |
allocator | mimalloc |
features | default, sqlite, system-clipboard, trash, which |
installed_plugins |
Additional context
No response