build: Only artifact console on failure
No reason to save it on success.
@@ -605,11 +605,11 @@ EOF
rm -rf "${tmp_builddir}/supermin.out" "${vmpreparedir}" "${vmbuilddir}"
+ if [ ! -f "${rc_file}" ]; then
+ cat "${runvm_console}"
if test -n "${ARTIFACT_DIR:-}"; then
cp "${runvm_console}" "${ARTIFACT_DIR}"
fi
- if [ ! -f "${rc_file}" ]; then
- cat "${runvm_console}"
fatal "Couldn't find rc file; failure inside supermin init?"
fi
rc="$(cat "${rc_file}")"
