fix(windows): splat arguments for pnpx (#8608)

This commit is contained in:
Jake
2024-10-05 07:51:04 +08:00
committed by GitHub
parent 119fc5bacb
commit c9ea43cdce
2 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-setup": patch
"pnpm": patch
---
The pnpx command should work correctly on Windows, when pnpm is installed via the standalone installation script [#8608](https://github.com/pnpm/pnpm/pull/8608).

View File

@@ -86,7 +86,7 @@ function createPnpxScripts (targetDir: string): void {
].join('\n')
fs.writeFileSync(path.join(targetDir, 'pnpx.cmd'), batchScript)
const powershellScript = 'pnpm dlx $args'
const powershellScript = 'pnpm dlx @args'
fs.writeFileSync(path.join(targetDir, 'pnpx.ps1'), powershellScript)
}
}