Otherwise if we specify e.g. --package-directories= on the command
line it'll get written as None into the history and won't get parsed
properly by Config.from_partial_json().
context.cli |= history
- cli = copy.deepcopy(context.cli)
-
# One of the specifiers needs access to the directory, so make sure it is available.
context.config["directory"] = args.directory
+ cli = copy.deepcopy(context.cli)
+ for dest in cli:
+ if dest in SETTINGS_LOOKUP_BY_DEST:
+ cli[dest] = context.finalize_value(SETTINGS_LOOKUP_BY_DEST[dest])
+
context.parse_new_includes()
context.config["files"] = []