diff --git a/ChangeLog b/ChangeLog index 61791b8..4a0b383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ v4.5.1 * Fix gcalcli failing to run on python 3.10 if config file is present + * Fix `config edit` when missing config dir blowing up with FileNotFoundError * Fix bizarre SSL recursion errors by moving truststore init earlier * Fix redundant "Ignore and refresh" prompt from `init` * Adjust "when" value parsing to handle YYYY-MM-DD consistently diff --git a/gcalcli/cli.py b/gcalcli/cli.py index f9fbfda..d1db09b 100755 --- a/gcalcli/cli.py +++ b/gcalcli/cli.py @@ -341,9 +341,10 @@ def main(): if parsed_args.subcommand == 'edit': printer.msg( f'Launching {utils.shorten_path(config_filepath)} in a ' - 'text editor...' + 'text editor...\n' ) if not config_filepath.exists(): + config_filepath.parent.mkdir(parents=True, exist_ok=True) with open(config_filepath, 'w') as f: f.write(EMPTY_CONFIG_TOML) utils.launch_editor(config_filepath)