Merge pull request #132 from IronRookieCoder/fix/weixin-startup-bad-weak-ptr
fix(weixin): avoid startup initialization without account
This commit is contained in:
commit
f655c50e51
|
|
@ -238,18 +238,17 @@ export async function runWeixinMcpServer(
|
||||||
version: string,
|
version: string,
|
||||||
deps: WeixinServerDeps,
|
deps: WeixinServerDeps,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
deps.enableConfigs()
|
|
||||||
deps.initializeAnalyticsSink()
|
|
||||||
|
|
||||||
const account = loadAccount()
|
const account = loadAccount()
|
||||||
if (!account) {
|
if (!account) {
|
||||||
process.stderr.write(
|
process.stderr.write(
|
||||||
'[weixin] No account configured. Run `ccb weixin login` to connect your WeChat account.\n',
|
'[weixin] No account configured. Run `ccb weixin login` to connect your WeChat account.\n',
|
||||||
)
|
)
|
||||||
await Promise.all([deps.shutdown1PEventLogging(), deps.shutdownDatadog()])
|
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deps.enableConfigs()
|
||||||
|
deps.initializeAnalyticsSink()
|
||||||
|
|
||||||
const server = createWeixinMcpServer(version)
|
const server = createWeixinMcpServer(version)
|
||||||
const transport = new StdioServerTransport()
|
const transport = new StdioServerTransport()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user