Skip to content

du -X with a nonexistent file panics #11924

@ajanicij

Description

@ajanicij

Running

du -X nonexistent-file

causes panic:

thread 'main' (1402696) panicked at src/uu/du/src/du.rs:759:37:
no such file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)

But GNU's du just prints this:

du: nonexistent-file: No such file or directory
Try 'du --help' for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions