From c6e0969f6a75460b03ef7b456561b96aa7d8acc7 Mon Sep 17 00:00:00 2001 From: John Fay Date: Mon, 21 Aug 2023 22:16:26 -0400 Subject: [PATCH] fix: Move puppeteer args to arm64 darwin only --- src/generate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generate.ts b/src/generate.ts index ec7867e..838828a 100644 --- a/src/generate.ts +++ b/src/generate.ts @@ -444,11 +444,10 @@ export default async (options: GeneratorOptions) => { ); let executablePath: string | undefined; let puppeteerConfigJson: PuppeteerConfiguration & { - args: string[]; + args?: string[]; } = { logLevel: debug ? 'warn' : 'error', executablePath, - args: ['--no-sandbox'], }; // if MacOS M1/M2, provide your own path to chromium if (os.platform() === 'darwin' && os.arch() === 'arm64') { @@ -463,6 +462,7 @@ export default async (options: GeneratorOptions) => { ); } puppeteerConfigJson.executablePath = executablePath; + puppeteerConfigJson.args = ['--no-sandbox']; } catch (error) { console.error(error); console.log(