Skip to content

Commit

Permalink
cmd-build: ensure that compose.json exists
Browse files Browse the repository at this point in the history
In a Jenkins build environment, compose.json may not exist.
  • Loading branch information
Ben Howard authored and openshift-merge-robot committed Aug 31, 2020
1 parent e502337 commit 1adb9f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd-build
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ strip_out_lockfile_digests "$lockfile_out".tmp
/usr/lib/coreos-assembler/finalize-artifact "${lockfile_out}"{.tmp,}
# Very special handling for --write-composejson-to as rpm-ostree doesn't
# write it if the commit didn't change.
if [ -f "${changed_stamp}" ]; then
if [ -f "${changed_stamp}" ] && [ -f "${composejson}" ]; then
commit=$(jq -r '.["ostree-commit"]' < "${composejson}")
# Clean up prior versions
rm -f "${workdir}"/tmp/compose-*.json
Expand Down

0 comments on commit 1adb9f1

Please sign in to comment.