From 5e5d1181e528272c59f9b90aa5ac363cb90d8969 Mon Sep 17 00:00:00 2001 From: Shigma <1700011071@pku.edu.cn> Date: Mon, 16 Nov 2020 13:51:45 +0800 Subject: [PATCH] fix(cli): koishi start reported unsupported type, fix #129 --- packages/koishi/src/worker.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/koishi/src/worker.ts b/packages/koishi/src/worker.ts index 05699bfdd4..1469474425 100644 --- a/packages/koishi/src/worker.ts +++ b/packages/koishi/src/worker.ts @@ -106,6 +106,12 @@ process.on('message', (data: Message) => { } }) +// load adapter +try { + const [name] = config.type.split('.', 1) + loadEcosystem('adapter', name) +} catch {} + const app = new App(config) app.command('exit', '停止机器人运行', { authority: 4 }) @@ -123,12 +129,6 @@ app.command('exit', '停止机器人运行', { authority: 4 }) process.exit(514) }) -// load adapter -try { - const [name] = config.type.split('.', 1) - loadEcosystem('adapter', name) -} catch {} - // load plugins if (Array.isArray(config.plugins)) { for (const item of config.plugins) {