svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit
BSD 3-Clause "New" or "Revised" License
17 stars 14 forks source link

Add "overwrite" option to plugin #151

Open pshriwise opened 1 year ago

pshriwise commented 1 year ago

We don't currently provide a check that the file we're trying to create already exists. For other Cubit commands that create/export a file, an "overwrite" option is provided to clarify that the file should be replaced if the specified filename is already present.

MicahGale commented 1 year ago

If a file conflict is found what's the preferred behavior? Termination with an error? Appending a suffix?

pshriwise commented 1 year ago

I believe the convention is termination with an error as soon as possible, to follow your sentiments in #150.

gonuke commented 1 year ago

It is definitely the Cubit convention to only overwrite when forced with the overwrite keyword, and to fail with an error otherwise. The command terminates, but the in an interactive session , the application doesn't terminate.