mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add addon not found warning
This commit is contained in:
1 parent
2d1c218999
commit
6a4aa14016
5 files changed
+9
-3
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user