From 1adb9f15129e6686d5131f4991d1d98f623e8137 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Mon, 31 Aug 2020 09:53:37 -0600 Subject: [PATCH] cmd-build: ensure that compose.json exists In a Jenkins build environment, compose.json may not exist. --- src/cmd-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd-build b/src/cmd-build index 2d277cf887..f442437758 100755 --- a/src/cmd-build +++ b/src/cmd-build @@ -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