fix(darwin): call sw_vers with single switch for improved compatibility

This commit is contained in:
Martin Wimpress 2024-05-15 01:46:33 +01:00 committed by Martin Wimpress
parent 085dfea742
commit c3792c61f4
1 changed files with 1 additions and 1 deletions

View File

@ -1063,7 +1063,7 @@ function vm_boot() {
if [ "${OS_KERNEL}" == "Darwin" ]; then
# Get macOS product name and version using swvers
if [ -x "$(command -v sw_vers)" ]; then
OS_RELEASE="$(sw_vers --productName) $(sw_vers --productVersion)"
OS_RELEASE="$(sw_vers -productName) $(sw_vers -productVersion)"
fi
elif [ -e /etc/os-release ]; then
OS_RELEASE=$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)