chore(iso): drop unreachable else branches in build helpers

nomarchy-build-iso and nomarchy-build-live-iso both ran under set -e
but then wrapped nix build in an if [ \$? -eq 0 ] block with an else
that printed "Error: ISO build failed." and exit 1. set -e aborts the
script the instant nix build returns non-zero, so the else branch was
never reached — the user saw nix build's own error output and the
script exited.

Removed the dead conditional. Behaviour is identical.
This commit is contained in:
Bernardo Magri
2026-05-21 21:13:41 +01:00
parent 67e5cd6014
commit 1ae27cd302
2 changed files with 6 additions and 20 deletions

View File

@@ -4,15 +4,8 @@ set -e
# Build the Nomarchy Installer ISO declaratively using the flake.
echo "Building Nomarchy Installer ISO..."
# The output will be a symlink named 'result' in the current directory
nix build .#nixosConfigurations.nomarchy-installer.config.system.build.isoImage
if [ $? -eq 0 ]; then
ISO_PATH=$(readlink -f result/iso/*.iso)
echo "Success! ISO built at: $ISO_PATH"
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
else
echo "Error: ISO build failed."
exit 1
fi
ISO_PATH=$(readlink -f result/iso/*.iso)
echo "Success! ISO built at: $ISO_PATH"
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."