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:
Zoltan Kochan
2026-03-16 01:58:24 +01:00
parent 24a61aa18d
commit 1fb299a44f
3 changed files with 2 additions and 2 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,5 @@
{ {
"private": true, "private": true,
"packageManager": "pnpm@10.32.1",
"scripts": { "scripts": {
"build:bundle": "esbuild src/index.ts --bundle --platform=node --target=node24 --format=cjs --minify --outfile=dist/index.js --loader:.json=json", "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", "build": "pnpm run build:bundle",

View File

@@ -74,6 +74,7 @@ function runCommand(cmd: string, args: string[], opts: { cwd: string }): Promise
const cp = spawn(cmd, args, { const cp = spawn(cmd, args, {
cwd: opts.cwd, cwd: opts.cwd,
stdio: ['pipe', 'inherit', 'inherit'], stdio: ['pipe', 'inherit', 'inherit'],
shell: process.platform === 'win32',
}) })
cp.on('error', reject) cp.on('error', reject)
cp.on('close', resolve) cp.on('close', resolve)