Skip to content

Commit

Permalink
Only mount output directory if it exists when running clean scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Mar 27, 2024
1 parent 05d90cc commit 31af101
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkosi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4063,9 +4063,9 @@ def run_clean_scripts(config: Config) -> None:
mounts=[
*sources,
Mount(script, "/work/clean", ro=True),
Mount(config.output_dir_or_cwd(), "/work/out"),
*([Mount(o, "/work/out")] if (o := config.output_dir_or_cwd()).exists() else []),
],
options=["--dir", "/work/src", "--chdir", "/work/src"]
options=["--dir", "/work/src", "--chdir", "/work/src", "--dir", "/work/out"]
),
stdin=sys.stdin,
)
Expand Down

0 comments on commit 31af101

Please sign in to comment.