fix macOS issue. See #1607
This commit is contained in:
parent
0c1a7996d3
commit
2a1788a11b
1 changed files with 4 additions and 0 deletions
4
neofetch
4
neofetch
|
@ -4774,6 +4774,10 @@ cache_uname() {
|
||||||
kernel_machine="${uname[2]}"
|
kernel_machine="${uname[2]}"
|
||||||
|
|
||||||
if [[ "$kernel_name" == "Darwin" ]]; then
|
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}' \
|
IFS=$'\n' read -d "" -ra sw_vers <<< "$(awk -F'<|>' '/key|string/ {print $3}' \
|
||||||
"/System/Library/CoreServices/SystemVersion.plist")"
|
"/System/Library/CoreServices/SystemVersion.plist")"
|
||||||
for ((i=0;i<${#sw_vers[@]};i+=2)) {
|
for ((i=0;i<${#sw_vers[@]};i+=2)) {
|
||||||
|
|
Loading…
Reference in a new issue