sharp-cli icon indicating copy to clipboard operation
sharp-cli copied to clipboard

Option to delete original?

Open Nantris opened this issue 3 years ago • 3 comments

I know you can use {dir} to overwrite the original, but that can't help if the operation is a conversion from, for example, png to jpg.

Thanks for sharing this great project!

Nantris avatar Aug 09 '22 00:08 Nantris

I don't think the CLI should be removing files - you can always write a script that takes the input file and deletes it after processing.

vseventer avatar Aug 09 '22 23:08 vseventer

Fair enough. I'd hoped not to have to do that, but it's an understandable position.

One substantial downside though is that it makes testing commands much more onerous because it means cleaning up files in {dir} or re-creating {dir} to its proper state before testing the command again.

Thanks for all your help and feel free to close this issue unless that downside sways you at all.

Nantris avatar Aug 09 '22 23:08 Nantris

do your testing in a git managed folder you quickly setup and then just do a hard reset on the repository to clean up? no? It's quick. rm -rf $tmpDir is also quick.

mathieu-aubin avatar Jul 12 '23 02:07 mathieu-aubin