Repository navigation
Closed
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemgood first issueGood for newcomers
Milestone
Description
Describe the bug
This is not so helpful:
〉rm --recursive --force --verbose *
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────
Error:
× Could not delete because: Permission denied (os error 13)
╭─[entry #54:1:1]
1 │ rm --recursive --force --verbose *
· ─┬
· ╰── Permission denied (os error 13)
╰────How to reproduce
Create some files which the current user cannot delete, then try to delete all of them.
Expected behavior
I expected nu to display the name or the full path of the non-deletable file in the error message.
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.79.0 |
| branch | |
| commit_hash | |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.68.2 (9eb3afe9e 2023-03-27) (built from a source tarball) |
| cargo_version | cargo 1.68.1 (6feb7c9cf 2023-03-26) |
| build_time | 2023-04-25 20:06:17 +00:00 |
| build_rust_channel | release |
| features | default, zip |
| installed_plugins |
Additional context
No response
Reacted by Antoine Stevan
Metadata
Metadata
Assignees
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemgood first issueGood for newcomers
Activity
juanPabloMiceli commentedon Apr 27, 2023
Do we know what the '[entry #54:1:1]' is?
I think the error could look like:
juanPabloMiceli commentedon Apr 27, 2023
There is also this ShellError enum RemoveNotPossible we are not using. Maybe we should replace this GenericError with the RemoveNotPossible one.
juanPabloMiceli commentedon Apr 28, 2023
I am struggling with getting the span of the targets after replacing "" with each file in the folder. Are they computed somewhere already? Or do I need to compute them by hand? Because the only span I am being able to find in the scope is the one for the original target (for example: /home/user/folder/)
michaeljohnalbers commentedon May 6, 2023
@juanPabloMiceli I took a stab at the fix on #9120. I left the command (and related span) unaltered as that is what the user entered. Presumably they can the actual error wasn't specifically on a glob pattern but on an actual file, which of course is not included in the error message.
Fix missing file names from rm errors (#9120)