From 280b10c2142680456ea28b8a370523e6bcee3106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=E2=80=9CNiols=E2=80=9D=20Jeannerod?= Date: Fri, 21 Feb 2025 11:16:21 +0100 Subject: [PATCH] Report Nix build errors nicely --- infra/proxmox-provision.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infra/proxmox-provision.sh b/infra/proxmox-provision.sh index 9d59cc76..9972b15b 100755 --- a/infra/proxmox-provision.sh +++ b/infra/proxmox-provision.sh @@ -202,6 +202,12 @@ build_iso () { --log-format raw --quiet \ --out-link "$tmpdir/installer-$2" + if [ $? -ne 0 ]; then + die 'Something went wrong when building ISO for VM %s. +Check the Nix logs and fix things. Possibly there just is no NixOS configuration by that name?' \ + "$2" + fi + ln -sf "$tmpdir/installer-$2/iso/installer.iso" "$tmpdir/installer-$2.iso" printf 'done building ISO for VM %s.\n' "$2"