From a27608e24ad0f94438b9553533245aa0775dedba Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 21 Nov 2022 12:44:52 +0100 Subject: [PATCH] fix execa usage in build and check scripts --- scripts/build-package.js | 3 ++- scripts/check-package.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/build-package.js b/scripts/build-package.js index 3e9843b83282..fb9dd2642c3e 100644 --- a/scripts/build-package.js +++ b/scripts/build-package.js @@ -115,7 +115,8 @@ async function run() { selection?.filter(Boolean).forEach(async (v) => { const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.prep; const cwd = resolve(__dirname, '..', 'code', v.location); - const sub = await import('execa').execaCommand( + const { execaCommand } = await import('execa'); + const sub = execaCommand( `${commmand}${watchMode ? ' --watch' : ''}${prodMode ? ' --optimized' : ''}`, { cwd, diff --git a/scripts/check-package.js b/scripts/check-package.js index 1cee8b12cd9b..bf2d95a8fbd7 100644 --- a/scripts/check-package.js +++ b/scripts/check-package.js @@ -98,7 +98,8 @@ async function run() { selection?.filter(Boolean).forEach(async (v) => { const commmand = (await readJSON(resolve(v.location, 'package.json'))).scripts.check; const cwd = resolve(__dirname, '..', 'code', v.location); - const sub = await import('execa').execaCommand(`${commmand}${watchMode ? ' --watch' : ''}`, { + const { execaCommand } = await import('execa'); + const sub = execaCommand(`${commmand}${watchMode ? ' --watch' : ''}`, { cwd, buffer: false, shell: true,