-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Confusing error message when cd to non-existing directory #8027
Copy link
Copy link
Closed
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemThe error message you observe is not helpful to identify the problemA:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemgood first issueGood for newcomersGood for newcomers
Milestone
Description
Describe the bug
If I want to cd into a non-existing directory, the error message adds confusing implementation details.
How to reproduce
nu ❯ cd askldjflasjk
Error: nu::shell::directory_not_found (link)
× Directory not found
╭─[entry #1:1:1]
1 │ cd askldjflasjk
· ──────┬─────
· ╰── directory not found
╰────
help: IO Error: NotADirectory(Span { start: 85214, end: 85226 })
Expected behavior
The same thing but without NotADirectory(Span { start: 85214, end: 85226 })
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.75.0 |
| branch | |
| commit_hash | 17a265b |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.66.1 (90743e729 2023-01-10) |
| rust_channel | 1.66.1-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.66.1 (ad779e08b 2023-01-10) |
| pkg_version | 0.75.0 |
| build_time | 2023-01-31 20:39:29 +00:00 |
| build_rust_channel | release |
| features | database, default, trash, which, zip |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemThe error message you observe is not helpful to identify the problemA:file-systemRelated to commands and core nushell behavior around the file systemRelated to commands and core nushell behavior around the file systemgood first issueGood for newcomersGood for newcomers