From c9ea43cdce37db6ff767cf87d9d84238a0236f22 Mon Sep 17 00:00:00 2001 From: Jake Date: Sat, 5 Oct 2024 07:51:04 +0800 Subject: [PATCH] fix(windows): splat arguments for pnpx (#8608) --- .changeset/forty-goats-exist.md | 6 ++++++ packages/plugin-commands-setup/src/setup.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/forty-goats-exist.md diff --git a/.changeset/forty-goats-exist.md b/.changeset/forty-goats-exist.md new file mode 100644 index 0000000000..7fa151b0ae --- /dev/null +++ b/.changeset/forty-goats-exist.md @@ -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). diff --git a/packages/plugin-commands-setup/src/setup.ts b/packages/plugin-commands-setup/src/setup.ts index 2896a88053..1c647887e8 100644 --- a/packages/plugin-commands-setup/src/setup.ts +++ b/packages/plugin-commands-setup/src/setup.ts @@ -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) } }