holmgr / cargo-sweep

A cargo subcommand for cleaning up unused build files generated by Cargo
MIT License
693 stars 31 forks source link

`-i` is broken on master #46

Closed birkenfeld closed 1 year ago

birkenfeld commented 3 years ago
$ cargo run -- sweep -d -r -i      
   Compiling cargo-sweep v0.5.0 (/home/gbr/devel/ext/cargo-sweep)
    Finished dev [unoptimized + debuginfo] target(s) in 1.55s
     Running `target/debug/cargo-sweep sweep -d -r -i`
thread 'main' panicked at '--time argument missing', src/main.rs:219:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PatchMixolydic commented 3 years ago

The panic was introduced in 4430478, which was written in response to e53601a. The combination of these seems to have effectively made --time required, despite it not being marked as required (ca. 037155c).

Personally, I'd expect cargo-sweep to simply not delete any files based on time if --time is not provided, but this might disrupt the workflow of people who have come to expect cargo-sweep to delete old files by default.

jyn514 commented 1 year ago

This seems to be fixed on master.