From babfbf771cdbdb886a54d9937a99d3cef71544a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 23 Dec 2024 10:40:58 +0100 Subject: [PATCH] use shell --- test/pkg/pkg.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/pkg/pkg.test.js b/test/pkg/pkg.test.js index 1348b2d7f..a74b03303 100644 --- a/test/pkg/pkg.test.js +++ b/test/pkg/pkg.test.js @@ -24,8 +24,7 @@ test('worker test when packaged into executable using pkg', { skip: !!process.en // package the app into several node versions, check config for more info const filePath = `${join(__dirname, packageName)}.js` const configPath = join(__dirname, 'pkg.config.json') - const npxExecutable = platform === 'win32' ? 'npx.cmd' : 'npx' - const { stderr } = await execFile(npxExecutable, ['pkg', filePath, '--config', configPath]) + const { stderr } = await execFile('npx', ['pkg', filePath, '--config', configPath], { shell: true }) // there should be no error when packaging const expectedvalue = stderr === '' || deprecationWarningRegex.test(stderr)