-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix traceback when not passing file to -o option (#698)
If precli-init is run without an argument for the -o, it will fail with a traceback due to the argparse.FileType not allowing a default of a str for a file name. This change does the logic of detecting and opening files manually on its own. It will present an error if the file already exists to prevent overwriting. Except in the case where the file is pyproject.toml and the settings will be appended to it. Signed-off-by: Eric Brown <eric.brown@securesauce.dev>
- Loading branch information
Showing
2 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters