Skip to content

Commit

Permalink
Parse local drop-in configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
slarew authored and DaanDeMeyer committed Oct 30, 2024
1 parent b3d1233 commit 8319338
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mkosi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4075,10 +4075,11 @@ def parse_config_one(self, path: Path, parse_profiles: bool = False, parse_local
if extras:
if parse_local:
if (
(localpath := path.parent / "mkosi.local/mkosi.conf").exists()
((localpath := path.parent / "mkosi.local") / "mkosi.conf").exists()
or (localpath := path.parent / "mkosi.local.conf").exists()
): # fmt: skip
self.parse_config_one(localpath)
with chdir(localpath if localpath.is_dir() else Path.cwd()):
self.parse_config_one(localpath if localpath.is_file() else Path("."))

# Local configuration should override other file based
# configuration but not the CLI itself so move the finalized
Expand Down

0 comments on commit 8319338

Please sign in to comment.