From 3a431006a9f24790d874a1c9a4661a427eca0053 Mon Sep 17 00:00:00 2001 From: Christian Heusel <christian@heusel.eu> Date: Wed, 14 Feb 2024 19:37:37 +0100 Subject: [PATCH] gitlab_runner: fix error about unbound variable When there was an error i.e. with the image verification the loopdev variable was unbound in the cleanup function. We fix this by defining the variable as empty. Signed-off-by: Christian Heusel <christian@heusel.eu> --- roles/gitlab_runner/files/libvirt-executor-update-base-image | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/gitlab_runner/files/libvirt-executor-update-base-image b/roles/gitlab_runner/files/libvirt-executor-update-base-image index 3bd6a6830..5e56a9ead 100755 --- a/roles/gitlab_runner/files/libvirt-executor-update-base-image +++ b/roles/gitlab_runner/files/libvirt-executor-update-base-image @@ -4,6 +4,8 @@ readonly libvirt_default_pool_path="/var/lib/libvirt/images" readonly arch_boxes_signing_key=/usr/local/lib/libvirt-executor/arch-boxes.asc readonly arch_boxes_fingerprint=1B9A16984A4E8CB448712D2AE0B78BF4326C6F8F +loopdev="" + cleanup() { set +o errexit -- GitLab