From 3877b7c7f5c9cc736eecabbc71d320364a3633d1 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Sat, 9 Dec 2023 12:32:12 -0500 Subject: [PATCH] fix: improve error message for unknown macOS version --- src/engines/javascriptcore.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engines/javascriptcore.js b/src/engines/javascriptcore.js index 445c567..5aa2bea 100644 --- a/src/engines/javascriptcore.js +++ b/src/engines/javascriptcore.js @@ -33,7 +33,8 @@ async function getVersionFromBuilder(builder) { } async function getMacBuilder() { - switch (await macName()) { + const name = await macName(); + switch (name) { case 'ventura': return 706; case 'monterey': @@ -41,7 +42,7 @@ async function getMacBuilder() { case 'sonoma': return 938; default: - throw new Error(`Unknown macOS release: ${macName()}`); + throw new Error(`Unknown macOS release: ${name}. If it's a new version, consider making a pull request to https://github.com/devsnek/esvu.`); } }