Skip to content

Commit

Permalink
use shell
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Dec 23, 2024
1 parent 41eb673 commit babfbf7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/pkg/pkg.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit babfbf7

Please sign in to comment.