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:
@@ -4,15 +4,8 @@ set -e
|
|||||||
# Build the Nomarchy Installer ISO declaratively using the flake.
|
# Build the Nomarchy Installer ISO declaratively using the flake.
|
||||||
|
|
||||||
echo "Building Nomarchy Installer ISO..."
|
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
|
nix build .#nixosConfigurations.nomarchy-installer.config.system.build.isoImage
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
ISO_PATH=$(readlink -f result/iso/*.iso)
|
||||||
ISO_PATH=$(readlink -f result/iso/*.iso)
|
echo "Success! ISO built at: $ISO_PATH"
|
||||||
echo "Success! ISO built at: $ISO_PATH"
|
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
|
||||||
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
|
|
||||||
else
|
|
||||||
echo "Error: ISO build failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -4,15 +4,8 @@ set -e
|
|||||||
# Build the Nomarchy Live ISO (Full Desktop Environment) using the flake.
|
# Build the Nomarchy Live ISO (Full Desktop Environment) using the flake.
|
||||||
|
|
||||||
echo "Building Nomarchy Live ISO..."
|
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
|
nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
ISO_PATH=$(readlink -f result/iso/*.iso)
|
||||||
ISO_PATH=$(readlink -f result/iso/*.iso)
|
echo "Success! Live ISO built at: $ISO_PATH"
|
||||||
echo "Success! Live ISO built at: $ISO_PATH"
|
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
|
||||||
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
|
|
||||||
else
|
|
||||||
echo "Error: Live ISO build failed."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|||||||
Reference in New Issue
Block a user