Throw error when profile do not exist

This commit is contained in:
Northword 2023-07-12 22:36:42 +08:00
parent f7b7483a8a
commit 110b806eca

View File

@ -52,6 +52,8 @@ if (existsSync(profilePath)) {
writeFileSync(prefsPath, updatedPrefs, "utf-8");
console.log("[info] The <profile>/prefs.js has been modified.");
}
} else {
throw new Error("The given Zotero profile does not exist.");
}
const startZotero = `"${zoteroBinPath}" --debugger --purgecaches -profile ${profilePath}`;