Skip to content

Commit

Permalink
installer: update macOS version check to 10.12.2
Browse files Browse the repository at this point in the history
Nixpkgs will drop support for <10.12 soon and thus a nix release built
using the 19.03 channel will also require a newer version of macOS.
  • Loading branch information
LnL7 committed Dec 20, 2018
1 parent ff342fc commit db321e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/install-nix-from-closure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ if [ -z "$HOME" ]; then
exit 1
fi

# macOS support for 10.10 or higher
# macOS support for 10.12.6 or higher
if [ "$(uname -s)" = "Darwin" ]; then
if [ $(($(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"
macos_major=$(sw_vers -productVersion | cut -d '.' -f 2)
macos_minor=$(sw_vers -productVersion | cut -d '.' -f 3)
if [ "$macos_minor" -lt 12 ] || ([ "$macos_minor" -eq 12 ] && [ "$macos_major" -lt 6 ]); then
echo "$0: macOS $(sw_vers -productVersion) is not supported, upgrade to 10.12.6 or higher"
exit 1
fi
fi
Expand Down

0 comments on commit db321e8

Please sign in to comment.