From 2a1788a11bc25744bbdae3d9844c6c1ac5ce557b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 17 Nov 2020 11:49:46 +0200 Subject: [PATCH] fix macOS issue. See #1607 --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 59e29d54..4cb397e7 100755 --- a/neofetch +++ b/neofetch @@ -4774,6 +4774,10 @@ cache_uname() { kernel_machine="${uname[2]}" if [[ "$kernel_name" == "Darwin" ]]; then + # macOS can report incorrect versions unless this is 0. + # https://github.com/dylanaraps/neofetch/issues/1607 + export SYSTEM_VERSION_COMPAT=0 + IFS=$'\n' read -d "" -ra sw_vers <<< "$(awk -F'<|>' '/key|string/ {print $3}' \ "/System/Library/CoreServices/SystemVersion.plist")" for ((i=0;i<${#sw_vers[@]};i+=2)) {