Skip to content

Instantly share code, notes, and snippets.

@ww898
Last active October 6, 2021 16:08
Show Gist options
  • Save ww898/f146a1c384109c508ffbc6b5f0865ad9 to your computer and use it in GitHub Desktop.
Save ww898/f146a1c384109c508ffbc6b5f0865ad9 to your computer and use it in GitHub Desktop.
Get macOS version
#!/usr/bin/env osascript -l JavaScript
values = ObjC.deepUnwrap($.NSProcessInfo.processInfo.operatingSystemVersion)
for (name in values) {
console.log(name, values[name])
}
@ww898
Copy link
Author

ww898 commented Oct 6, 2021

Run with SYSTEM_VERSION_COMPAT=1 for compatibility mode under macOS Big Sur and Monterey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment