Skip to content

Commit

Permalink
fix: Move puppeteer args to arm64 darwin only
Browse files Browse the repository at this point in the history
  • Loading branch information
keonik committed Aug 22, 2023
1 parent d4e99f0 commit c6e0969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -463,6 +462,7 @@ export default async (options: GeneratorOptions) => {
);
}
puppeteerConfigJson.executablePath = executablePath;
puppeteerConfigJson.args = ['--no-sandbox'];
} catch (error) {
console.error(error);
console.log(
Expand Down

0 comments on commit c6e0969

Please sign in to comment.