diff --git a/jrnl/install.py b/jrnl/install.py index b5ce9b33..f8322fba 100644 --- a/jrnl/install.py +++ b/jrnl/install.py @@ -76,10 +76,8 @@ def load_or_install_jrnl(alt_config_path): config = load_config(config_path) if config is None: - print( - f"Configuration file {config_path} is empty, now using default config" - ) - config = get_default_config() + print("Unable to parse config file", file=sys.stderr) + sys.exit() if is_old_version(config_path): from jrnl import upgrade diff --git a/tests/lib/given_steps.py b/tests/lib/given_steps.py index ba619dba..dd7c4720 100644 --- a/tests/lib/given_steps.py +++ b/tests/lib/given_steps.py @@ -101,7 +101,11 @@ def we_use_the_config(request, temp_dir, working_dir): # @todo get rid of this by using default config values # merge in version number - if config_file.endswith("yaml") and os.path.exists(config_dest): + if ( + config_file.endswith("yaml") + and os.path.exists(config_dest) + and os.path.getsize(config_dest) > 0 + ): # Add jrnl version to file for 2.x journals with open(config_dest, "a") as cf: cf.write("version: {}".format(__version__))