blob: b0982cdd90fbd1db610a9f9d1a7bcdaed59bc3d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import puppeteer from 'puppeteer-core';
(async () => {
try {
await puppeteer.launch({
product: '${product}',
executablePath: 'node',
});
} catch (error) {
if (
error.message.includes(
'Browser was not found at the configured executablePath (node)'
)
) {
process.exit(0);
}
console.error(error);
process.exit(1);
}
})();
|