Skip to content

Commit

Permalink
Fix default file parsing of three options
Browse files Browse the repository at this point in the history
The default file should only be used if an option is not specified on
the command line, but instead, it was only used if the option *was*
specified (overriding the specified value).
  • Loading branch information
lucaswerkmeister committed Feb 26, 2017
1 parent f2ee4e9 commit 1eafe08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkosi
Original file line number Diff line number Diff line change
Expand Up @@ -1766,10 +1766,10 @@ def process_setting(args, section, key, value):
else:
args.extra_trees.extend(list_value)
elif key == "BuildScript":
if args.build_script is not None:
if args.build_script is None:
args.build_script = value
elif key == "BuildSources":
if args.build_sources is not None:
if args.build_sources is None:
args.build_sources = value
elif key == "BuildPackages":
list_value = value if type(value) == list else value.split()
Expand All @@ -1781,7 +1781,7 @@ def process_setting(args, section, key, value):
if args.postinst_script is None:
arg.postinst_script = value
elif key == "NSpawnSettings":
if args.nspawn_settings is not None:
if args.nspawn_settings is None:
args.nspawn_settings = value
elif key is None:
return True
Expand Down

0 comments on commit 1eafe08

Please sign in to comment.