diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh index d7098691..92c3c80c 100644 --- a/scripts/install-nix-from-closure.sh +++ b/scripts/install-nix-from-closure.sh @@ -12,6 +12,12 @@ if ! [ -e $self/.reginfo ]; then exit 1 fi +# macOS support for 10.10 or higher +if [[ "$(uname -s)" = "Darwin" && $(($(sw_vers -productVersion | cut -d '.' -f 2))) -lt 10 ]]; then + echo "$0: macOS $(sw_vers -productVersion) is not supported, upgrade to 10.10 or higher" + exit 1 +fi + if [ -z "$USER" ]; then echo "$0: \$USER is not set" >&2 exit 1