You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Confusing error message when cd to non-existing directory #8027
A:error-unhelpfulThe error message you observe is not helpful to identify the problemA:file-systemRelated to commands and core nushell behavior around the file systemgood first issueGood for newcomers
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 })
A:error-unhelpfulThe error message you observe is not helpful to identify the problemA:file-systemRelated to commands and core nushell behavior around the file systemgood first issueGood for newcomers
Activity
fdncred commentedon Feb 10, 2023
I think it's fine to have the IO error there like:
but not the span. Good catch.
ryand67 commentedon Feb 11, 2023
I'd like to take a stab at this one if it's available!
fdncred commentedon Feb 11, 2023
Go for it @ryand67. Thanks for jumping in.
Change DirectoryNotFound error message for invalid cd command to not …
Change DirectoryNotFound error message for invalid cd command to not …
Change DirectoryNotFound error message for invalid cd command to not …
#8027 Hide implementation details in invalid cd call (#8049)
rgwood commentedon Feb 13, 2023
Fixed in #8049