From 39cd9bde1f24b63c2439120f0287f0c01e217a56 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 25 Nov 2025 04:11:02 +0100 Subject: [PATCH] chore: route exec logging through logger --- src/process/exec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/process/exec.ts b/src/process/exec.ts index 675914714..b96c47ee0 100644 --- a/src/process/exec.ts +++ b/src/process/exec.ts @@ -1,6 +1,7 @@ import { execFile, spawn } from "node:child_process"; import { danger, isVerbose } from "../globals.js"; +import { logDebug, logError } from "../logger.js"; // Simple promise-wrapped execFile with optional verbosity logging. export async function runExec( @@ -13,13 +14,13 @@ export async function runExec( timeout: timeoutMs, }); if (isVerbose()) { - if (stdout.trim()) console.log(stdout.trim()); - if (stderr.trim()) console.error(stderr.trim()); + if (stdout.trim()) logDebug(stdout.trim()); + if (stderr.trim()) logError(stderr.trim()); } return { stdout, stderr }; } catch (err) { if (isVerbose()) { - console.error(danger(`Command failed: ${command} ${args.join(" ")}`)); + logError(danger(`Command failed: ${command} ${args.join(" ")}`)); } throw err; }