mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
bdd-test doesn't add version if file is (and should stay) empty.
This commit is contained in:
parent
0dd7ec798c
commit
ad33adeaa1
1 changed files with 5 additions and 1 deletions
|
@ -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__))
|
||||
|
|
Loading…
Add table
Reference in a new issue