nix: fix setup.sh script when running on MacOS

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-01-10 16:21:47 +01:00
parent 56a1df03f0
commit da76200433
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
1 changed files with 2 additions and 2 deletions

View File

@ -28,12 +28,12 @@ function install_nix() {
fi
}
if [[ ! -x "$(command -v git)" ]]; then
if [[ ! -x "$(command -v curl)" ]]; then
echo -e "${RED}The 'curl' utility is required for Nix installation.${RST}" >&2
exit 1
fi
if [[ "$(source /etc/os-release && echo "${NAME}")" == *NixOS* ]]; then
if [[ "$(source /etc/os-release 2>/dev/null && echo "${NAME}")" == *NixOS* ]]; then
echo -e "${GRN}Already running NixOS.${RST}"
exit
fi