From 1ae27cd3024abe7315a7aa121125e53fc3e17866 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Thu, 21 May 2026 21:13:41 +0100 Subject: [PATCH] chore(iso): drop unreachable else branches in build helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- features/scripts/utils/nomarchy-build-iso | 13 +++---------- features/scripts/utils/nomarchy-build-live-iso | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/features/scripts/utils/nomarchy-build-iso b/features/scripts/utils/nomarchy-build-iso index 057d19e..eb7880e 100755 --- a/features/scripts/utils/nomarchy-build-iso +++ b/features/scripts/utils/nomarchy-build-iso @@ -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'." diff --git a/features/scripts/utils/nomarchy-build-live-iso b/features/scripts/utils/nomarchy-build-live-iso index 2cef990..a23df29 100755 --- a/features/scripts/utils/nomarchy-build-live-iso +++ b/features/scripts/utils/nomarchy-build-live-iso @@ -4,15 +4,8 @@ set -e # Build the Nomarchy Live ISO (Full Desktop Environment) using the flake. echo "Building Nomarchy Live ISO..." - -# The output will be a symlink named 'result' in the current directory nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage -if [ $? -eq 0 ]; then - ISO_PATH=$(readlink -f result/iso/*.iso) - echo "Success! Live ISO built at: $ISO_PATH" - echo "You can now burn this to a USB drive using 'dd' or 'etcher'." -else - echo "Error: Live ISO build failed." - exit 1 -fi +ISO_PATH=$(readlink -f result/iso/*.iso) +echo "Success! Live ISO built at: $ISO_PATH" +echo "You can now burn this to a USB drive using 'dd' or 'etcher'."