Improve error handling in update-flutter-nix.sh by using 'set -euo pipefail'

This commit is contained in:
HendrikRauh 2026-02-08 17:21:18 +01:00
parent ccf4482723
commit b33f5a432b

View file

@ -3,7 +3,7 @@
# This script adjusts flake.nix to use the flutter version # This script adjusts flake.nix to use the flutter version
# pinned in .fvmrc. It fetches the appropriate commit hash. # pinned in .fvmrc. It fetches the appropriate commit hash.
set -e set -euo pipefail
for cmd in jq curl sed nix; do for cmd in jq curl sed nix; do
command -v $cmd >/dev/null 2>&1 || { echo "Error: $cmd is not installed!"; exit 1; } command -v $cmd >/dev/null 2>&1 || { echo "Error: $cmd is not installed!"; exit 1; }