Fix sw_vers call on older macOS versions

Apparently it didn't used to allow two hyphens before flags
This commit is contained in:
Dan Stillman 2023-06-23 02:01:00 -04:00
parent f8d8fb5e11
commit 3454c321e7

View file

@ -1333,7 +1333,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
if (Zotero.isMac) {
try {
return "macOS "
+ (await Zotero.Utilities.Internal.subprocess('sw_vers', ['--productVersion'])).trim();
+ (await Zotero.Utilities.Internal.subprocess('sw_vers', ['-productVersion'])).trim();
}
catch (e) {
Zotero.logError(e);