pipeline: only copy output if there is any
Make sure to verify that the pipeline actually produced any output before attempting to copy it out. This fixes osbuild running with `--output-directory` but without assembler.
This commit is contained in:
parent
1896047bae
commit
9dfa0e8a61
1 changed files with 1 additions and 1 deletions
|
|
@ -362,7 +362,7 @@ class Pipeline:
|
|||
|
||||
results.update(r) # This will also update 'success'
|
||||
|
||||
if results["success"] and output_directory is not None:
|
||||
if results["success"] and output_directory and "output_id" in results:
|
||||
output_source = object_store.resolve_ref(results["output_id"])
|
||||
if output_source is not None:
|
||||
subprocess.run(["cp", "--reflink=auto", "-a", f"{output_source}/.", output_directory], check=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue