holmgr / cargo-sweep

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

maybe safer to default to dryrun mode #61

Closed juhp closed 1 year ago

juhp commented 2 years ago

How about making dry-run the default mode and instead having a --delete option say to enable actual deletion?

That might be a friendlier approach: generally I like to see the affect of running such a command first before doing the deleting.

(Also in the unix-like world -n is a common short form option for dry-run.)

jyn514 commented 1 year ago

I don't think there's a need for dry-run to be the default; the worst this can do (barring bugs) is make you have to spend time recompiling, and you already have to think about the options at least a bit because cargo sweep without arguments gives an error.

I agree it would have been nice to use -n originally, but given that -d already exists I don't think there's a need for both. Single letter options are in short supply.