Skip to content

Commit 61c4d08

Browse files
authored
Merge pull request #1320 from rancher-sandbox/archlinux
Show cloud-init-output.log when "nerdctl info" fails
2 parents 5ca41e5 + 4826e53 commit 61c4d08

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hack/test-example.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ alpine_image="ghcr.io/containerd/alpine:3.14.0"
157157
if [[ -n ${CHECKS["containerd-user"]} ]]; then
158158
INFO "Run a nginx container with port forwarding 127.0.0.1:8080"
159159
set -x
160-
limactl shell "$NAME" nerdctl info
160+
if ! limactl shell "$NAME" nerdctl info; then
161+
limactl shell "$NAME" sudo cat /var/log/cloud-init-output.log
162+
ERROR '"nerdctl info" failed'
163+
exit 1
164+
fi
161165
limactl shell "$NAME" nerdctl pull --quiet ${nginx_image}
162166
limactl shell "$NAME" nerdctl run -d --name nginx -p 127.0.0.1:8080:80 ${nginx_image}
163167

0 commit comments

Comments
 (0)