fraunhoferfokus/deckschrubber

Make it safer by not deleting images when running without parameters

Closed this issue · 3 comments

I just unintentionally deleted a couple of images from my registry by running deckschrubber without any parameters.

It'd be safer to just print the help when deckschrubber is called. And require some parameter like -run or -repo=N to really cleanup the registry

That's exactly we have a dry run option (-dry flag)...

I know. But it's very usual for CLI tools to show a help text when called without any parameter. After some months without using deckschrubber, I executed it without any parameter expecting to have the options listed on the output... an then boom. Some images were deleted from the registry.

I guess that might be a common mistake for other users and may be easily preventable by requiring some extra parameter to really delete images. Maybe default value for -repo should be 0 (zero)?

Oh... and pardon my manners. Should have said that earlier: thanks for this tool, it's a life saver. Being using it with cron to cleanup my registry for almost a year now.

You make a good point. Do you want to submit a PR?