about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDomen Kožar <domen@enlambda.com>2017-01-25T06·29+0100
committerGitHub <noreply@github.com>2017-01-25T06·29+0100
commit00928c8bc9bff9ff69a98e6695fadd0078c962ca (patch)
treec8c3900ce698e9dc6054a11483f31da481df62fe
parent4e6a2fbc561f3e692a5644b3816a205ba769f39e (diff)
parent48d4a23aa073a22161d4b37eb0f6eb103dee68d0 (diff)
Merge pull request #1199 from NixOS/osx-minimal-version
Bail out if MacOS 10.9 or lower is used during installer
-rw-r--r--scripts/install-nix-from-closure.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/install-nix-from-closure.sh b/scripts/install-nix-from-closure.sh
index 1b4d92632f8e..d4eb1c6fbeb9 100644
--- a/scripts/install-nix-from-closure.sh
+++ b/scripts/install-nix-from-closure.sh
@@ -7,6 +7,13 @@ self="$(dirname "$0")"
 nix="@nix@"
 cacert="@cacert@"
 
+
+# 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 ! [ -e "$self/.reginfo" ]; then
     echo "$0: incomplete installer (.reginfo is missing)" >&2
     exit 1