diff --git a/packages/geek-auto-start-chat-with-boss/index.mjs b/packages/geek-auto-start-chat-with-boss/index.mjs index 5be9cb7..c914bf7 100644 --- a/packages/geek-auto-start-chat-with-boss/index.mjs +++ b/packages/geek-auto-start-chat-with-boss/index.mjs @@ -20,11 +20,6 @@ const { cookies: bossCookies } = readConfigFile('boss.json') const targetCompanyList = readConfigFile('target-company-list.json') -if (!bossCookies?.length) { - console.error('There is no cookies. you can save a copy with EditThisCookie extension.') - process.exit(1) -} - const recommendJobPageUrl = `https://www.zhipin.com/web/geek/job-recommend` const expectCompanySet = new Set(targetCompanyList) diff --git a/packages/run-core-of-geek-auto-start-chat-with-boss/index.mjs b/packages/run-core-of-geek-auto-start-chat-with-boss/index.mjs index d7a3cf7..2f058dc 100644 --- a/packages/run-core-of-geek-auto-start-chat-with-boss/index.mjs +++ b/packages/run-core-of-geek-auto-start-chat-with-boss/index.mjs @@ -9,7 +9,7 @@ import path from 'node:path' import { get__dirname } from '@bossgeekgo/utils/legacy-path.mjs'; import JSON5 from 'json5' import { readConfigFile } from '@bossgeekgo/geek-auto-start-chat-with-boss/runtime-file-utils.mjs' - +const { cookies: bossCookies } = readConfigFile('boss.json') const { groupRobotAccessToken: dingTalkAccessToken } = readConfigFile('dingtalk.json') const initPlugins = (hooks) => { @@ -17,6 +17,10 @@ const initPlugins = (hooks) => { } ;(async () => { + if (!bossCookies?.length) { + console.error('There is no cookies. You can save a copy with EditThisCookie extension.') + process.exit(1) + } const hooks = { puppeteerLaunched: new SyncHook(), pageLoaded: new SyncHook(),