diff --git a/dist/action.mjs b/dist/action.mjs index eb53707..f639502 100644 --- a/dist/action.mjs +++ b/dist/action.mjs @@ -72,10 +72,10 @@ function logCommand(command, ...args) { */ async function exec(command, args) { return new Promise((resolve, reject) => { - logCommand(command, ...args); const proc = spawn(command, args, { stdio: ["ignore", "inherit", "inherit"], }); + logCommand(proc.spawnfile, ...proc.spawnargs.splice(1)); proc.on("error", reject); proc.on("close", (code) => { if (code === 0) { diff --git a/src/exec.ts b/src/exec.ts index e2cb4e1..2e3e00b 100644 --- a/src/exec.ts +++ b/src/exec.ts @@ -12,10 +12,10 @@ import { spawn } from "node:child_process"; */ export async function exec(command: string, args: string[]): Promise { return new Promise((resolve, reject) => { - logCommand(command, ...args); const proc = spawn(command, args, { stdio: ["ignore", "inherit", "inherit"], }); + logCommand(proc.spawnfile, ...proc.spawnargs.splice(1)); proc.on("error", reject); proc.on("close", (code) => { if (code === 0) {