Report Nix build errors nicely

This commit is contained in:
Nicolas Jeannerod 2025-02-21 11:16:21 +01:00
parent 57e6127a7a
commit 280b10c214
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8

View file

@ -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"