From 4df84db4531b7a1b41423a48c58b48c8c8e5b330 Mon Sep 17 00:00:00 2001 From: Alexander Tomokhov Date: Wed, 27 Dec 2023 14:13:40 +0400 Subject: [PATCH] curl --fail --- nixos-infect | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos-infect b/nixos-infect index 01e4ef7..3d24392 100755 --- a/nixos-infect +++ b/nixos-infect @@ -153,7 +153,7 @@ EOF setupConf() { mkdir -p ${LOCAL_FLAKE_DIR} - if ! curl "${CONFIG_URL}" \ + if ! curl --fail "${CONFIG_URL}" \ | tar -xz -C ${LOCAL_FLAKE_DIR} --strip-components=1 --exclude=".*" then echo "Error downloading/extracting top level flake configuration!" @@ -389,12 +389,12 @@ installNix() { fi echo "Downloading install script from ${installURL}..." - if ! curl "${installURL}" -o "${tmpNixInstall}" &>/dev/null; then + if ! curl --fail "${installURL}" -o "${tmpNixInstall}" &>/dev/null; then echo "Failure while downloading Nix install script!" return 1 fi - if ! sha="$(curl "${shaURL}")"; then + if ! sha="$(curl --fail "${shaURL}")"; then echo "Failure while downloading Nix install script sha!" return 1 fi