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
Error file_not_found in Windows when missing read permission #14528
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 systemplatform:windowsIssues which are specific to Windowsstatus:needs-triageAn issue that hasn't had any proper look
When using the open command in Nu to open a file, I receive a file_not_found error when I have no permissions to read the file.
A better error message would be nice (i.e. "no permission to access file") instead of "file not found".
How to reproduce
Create a file in Windows
Remove read permissions for the logged in user
Try to open the file with Nu
> echo ($env.systemroot ++ '\System32\LogFiles\Firewall\pfirewall.log') | open $in
Error: nu::shell::file_not_found
× File not found
╭─[entry #19:1:78]
1 │ echo ($env.systemroot ++ '\System32\LogFiles\Firewall\pfirewall.log') | open $in
· ─┬─
· ╰── file not found
╰────
help: C:\WINDOWS\System32\LogFiles\Firewall\pfirewall.log does not exist
Expected behavior
Return a better error message like "no permissions to access file" or something similar.
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 systemplatform:windowsIssues which are specific to Windowsstatus:needs-triageAn issue that hasn't had any proper look
Activity
Handle permission denied error at `nu_engine::glob_from` (#14679)
bminer commentedon Jan 14, 2025
Thank you! nushell is amazing!