From 58b836deb3b3b2d663960b72210f9f8e9717f6c7 Mon Sep 17 00:00:00 2001 From: geekgeekrun Date: Wed, 11 Feb 2026 23:10:52 +0800 Subject: [PATCH] add `isExtractDoneFlagFilePath` to mark chrome extension extract done --- .../utils.mjs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs b/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs index 91d6474..16b9c03 100644 --- a/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs +++ b/packages/launch-bosszhipin-login-page-with-preload-extension/utils.mjs @@ -47,7 +47,13 @@ export async function ensureEditThisCookie () { if (geekgeekrunEditVersion < APP_GEEKGEEKRUN_EDIT_VERSION) { isNeedExtractEditThisCookie = true } - + const isExtractDoneFlagFilePath = path.join(editThisCookieExtensionPath, 'EXTRACT_DONE') + if ( + !isNeedExtractEditThisCookie && + !fs.existsSync(isExtractDoneFlagFilePath) + ) { + isNeedExtractEditThisCookie = true + } if (isNeedExtractEditThisCookie) { if ( fs.existsSync( @@ -68,5 +74,9 @@ export async function ensureEditThisCookie () { dir: extensionDir } ) + await fs.promises.writeFile( + isExtractDoneFlagFilePath, + '' + ) } } \ No newline at end of file