mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-10-03 16:51:29 +00:00
fix macOS issue. See #1607
This commit is contained in:
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)) {
|
||||||
|
Reference in New Issue
Block a user