From 81fd625a29fd2c5c8efd29ae576f6a8e1820f26b Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Fri, 28 Apr 2023 18:18:40 +0300 Subject: [PATCH] refactor: resolving update notifier don't throw if package can't be found for some reason --- src/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index 6649bc0..6b9b1a4 100644 --- a/src/index.js +++ b/src/index.js @@ -49,10 +49,12 @@ module.exports = () => { await importCwd(bin).build(env) - updateNotifier({ - pkg: importCwd(resolveCwd('@maizzle/framework/package.json')), - shouldNotifyInNpmScript: true, - }).notify() + try { + updateNotifier({ + pkg: importCwd(resolveCwd('@maizzle/framework/package.json')), + shouldNotifyInNpmScript: true, + }).notify() + } catch {} }) program