It can be unclear what is going wrong without the raw output.
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Change-Id: Ia55bfb46ac7f69fa50ecf0b38fdec75f6a3fd6c2
[${PROFILE/-/_}]
${INSTANCE_IP}
EOF
+cat fake-inventory
CLEANUP+=(
"rm -f $(pwd)/fake-inventory"
)
incus stop "${INSTANCE_NAME}"
# Publish
-if FINGERPRINT=$(incus publish "${INSTANCE_NAME}" 2>&1 | grep -E -o '[A-Fa-f0-9]{64}') ; then
+PUBLISH_OUTPUT=$(incus publish "${INSTANCE_NAME}" 2>&1)
+if FINGERPRINT=$(echo "${PUBLISH_OUTPUT}" | grep -E -o '[A-Fa-f0-9]{64}') ; then
echo "Published instance with fingerprint '${FINGERPRINT}'"
else
+ echo "${PUBLISH_OUTPUT}"
fail 1 "No fingerprint for published instance"
fi