core&ui: add addon not found warning

This commit is contained in:
undefined committed 2022-10-26 23:24:02 +08:00
1 parent 2d1c218999
commit 6a4aa14016
5 files changed
+9 -3

No files matched your search

+3
View File
@@ -16,6 +16,8 @@ import { Logger } from './logger';
import { Context } from './context';
// eslint-disable-next-line import/no-duplicates
import { unwrapExports } from './utils';
import { PRIV } from './model/builtin';
import { inject } from './lib/ui';
const argv = cac().parse();
const logger = new Logger('loader');
@@ -95,6 +97,7 @@ export function addon(addonPath: string, prepend = false) {
} catch (e) {
logger.error(`Addon not found: ${addonPath}`);
logger.error(e);
inject('Notification', 'Addon not found: {0}', { args: [addonPath] }, PRIV.PRIV_VIEW_SYSTEM_NOTIFICATION);
}
}