mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-16 23:36:11 +08:00
fix: remove packageManager field and fix Windows npm spawn
- Remove packageManager from package.json to avoid version conflict when the action tests against itself (uses: ./) - Use shell: true on Windows so spawn can find npm.cmd Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.32.1",
|
||||
"scripts": {
|
||||
"build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --minify --outfile=dist/index.js --loader:.json=json",
|
||||
"build": "pnpm run build:bundle",
|
||||
|
||||
@@ -74,6 +74,7 @@ function runCommand(cmd: string, args: string[], opts: { cwd: string }): Promise
|
||||
const cp = spawn(cmd, args, {
|
||||
cwd: opts.cwd,
|
||||
stdio: ['pipe', 'inherit', 'inherit'],
|
||||
shell: process.platform === 'win32',
|
||||
})
|
||||
cp.on('error', reject)
|
||||
cp.on('close', resolve)
|
||||
|
||||
Reference in New Issue
Block a user