tools
tools copied to clipboard
Enhancement Request - Prompt user for overwriting destination files
If a destination file for an SPDX tool command already exist, the command files with a Error: File [file] already exists - please specify a new file. It would be easier for the interactive user if prompted to overwrite.
Prompting could cause issues for the application being run in a script. Suggest an option to allow prompting or have the overwrite be an option on the command line. I prefer the latter: "-overwrite option would overwrite the destination file(s) if it already exists".
Moved from Bugzilla Bug 1202
Another option that is often used, by tools like curl for example, is to create a new file with the same name but with a suffix or prefix that clearly shows it is the same file but a different version. Often it is a semantic like file-1.txt that is created. So you can have file.txt, file-1.txt, file-2.txt, etc. This way you never destroy the users data which ought to be a cardinal rule.