From 110b806eca4b84935c06a9c729f5de661366e4c5 Mon Sep 17 00:00:00 2001 From: Northword Date: Wed, 12 Jul 2023 22:36:42 +0800 Subject: [PATCH] Throw error when profile do not exist --- scripts/start.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/start.mjs b/scripts/start.mjs index fcf7e6d..1e51521 100644 --- a/scripts/start.mjs +++ b/scripts/start.mjs @@ -52,6 +52,8 @@ if (existsSync(profilePath)) { writeFileSync(prefsPath, updatedPrefs, "utf-8"); console.log("[info] The /prefs.js has been modified."); } +} else { + throw new Error("The given Zotero profile does not exist."); } const startZotero = `"${zoteroBinPath}" --debugger --purgecaches -profile ${profilePath}`;