Skip to content

Commit

Permalink
Fix empty config.json caused by buffered write
Browse files Browse the repository at this point in the history
  • Loading branch information
Cornelicorn authored and DaanDeMeyer committed Apr 1, 2024
1 parent 4dfdf98 commit d78f607
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def finalize_chroot_scripts(context: Context) -> contextlib.AbstractContextManag
def finalize_config_json(config: Config) -> Iterator[Path]:
with tempfile.NamedTemporaryFile(mode="w") as f:
f.write(config.to_json())
f.flush()
yield Path(f.name)


Expand Down

0 comments on commit d78f607

Please sign in to comment.