From ef4bcbc79cac9d9fcf83eb1a1ea442d662a40f28 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 9 Mar 2023 10:24:48 +1300 Subject: [PATCH] refactor: De-dupe Nix path detection --- install-nix.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install-nix.sh b/install-nix.sh index d6a09c9..5388092 100755 --- a/install-nix.sh +++ b/install-nix.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -if type -p nix &>/dev/null ; then - echo "Aborting: Nix is already installed at $(type -p nix)" +if nix_path="$(type -p nix)" ; then + echo "Aborting: Nix is already installed at ${nix_path}" exit fi