Skip to content

Commit

Permalink
chore: fix process usage
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Feb 5, 2023
1 parent 3bd9c93 commit e0bc577
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ export default function() {
// if we're running in CI, avoid problems by installing playwright
if (isCI) {
nitro.logger.info('Ensuring chromium install for og:image generation...')
const process = execa('npx', ['playwright', 'install', 'chromium'])
process.stderr?.pipe(process.stderr)
const installChromeProcess = execa('npx', ['playwright', 'install', 'chromium'])
installChromeProcess.stderr?.pipe(process.stderr)
await new Promise((resolve) => {
process.on('exit', (e) => {
installChromeProcess.on('exit', (e) => {
if (e !== 0)
nitro.logger.error('Failed to install Playwright dependency for og:image generation. Trying anyway...')
resolve(true)
Expand Down

0 comments on commit e0bc577

Please sign in to comment.