You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It’s kind of in bad taste to overwrite existing files if the user has not explicitely specified they should be overwritten (that is by adding arguments with their name).
The text was updated successfully, but these errors were encountered:
Anyways, I think it is quite common to overwrite an existing file in this case because you update your file. But for default.nix it is probably not such a great choice.
I could
Follow your suggestion and require an overwrite flag.
Look for a string like "Generated by crate2nix" and only overwrite if it is there.
Change the default to Cargo.nix so that it is unlikely that it is used already for something else.
I would just add a check if the user doesn’t specify anything explicitely; so:
crate2nix generate -o default.nix => overwrite file without a warning crate2nix generate => if default.nix exists, abort with exists error, if not, just write to it.
It’s kind of in bad taste to overwrite existing files if the user has not explicitely specified they should be overwritten (that is by adding arguments with their name).
The text was updated successfully, but these errors were encountered: