refactor: De-dupe Nix path detection

This commit is contained in:
Victor Engmark 2023-03-09 10:24:48 +13:00
parent e322e039f3
commit ef4bcbc79c

View file

@ -1,8 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euo pipefail
if type -p nix &>/dev/null ; then if nix_path="$(type -p nix)" ; then
echo "Aborting: Nix is already installed at $(type -p nix)" echo "Aborting: Nix is already installed at ${nix_path}"
exit exit
fi fi