From bdcf44c52df10766949f59ac2f5fa868754c3917 Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Fri, 16 Aug 2024 04:48:23 +0000 Subject: [PATCH] xen: add more sanitation options to update script We use a lot of pipes, so it's good to exit if any of the dependent commands fail. Signed-off-by: Fernando Rodrigues --- pkgs/applications/virtualization/xen/update.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/xen/update.sh b/pkgs/applications/virtualization/xen/update.sh index 230c1e5f6001..893ed5fa34da 100755 --- a/pkgs/applications/virtualization/xen/update.sh +++ b/pkgs/applications/virtualization/xen/update.sh @@ -1,8 +1,9 @@ #!/usr/bin/env nix-shell #!nix-shell -i bash -p gitMinimal curl gnupg nix-prefetch-git nixfmt-rfc-style # shellcheck disable=SC2206,SC2207 shell=bash -set -e - +set -o errexit +set -o pipefail +set -o nounset # This script expects to be called in an interactive terminal somewhere inside Nixpkgs. echo "Preparing..."