Skip to content

Filename is missing from rm errors #9004

@presidento

Description

@presidento

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-unhelpfulThe error message you observe is not helpful to identify the problemgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions