From 54ae20be1259cec5cf0756a5be0cf96a458bdc4f Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Thu, 29 Jan 2026 14:36:52 +0100 Subject: [PATCH 1/2] print all spawnCoanaDlx output on errors in CI --- src/utils/dlx.mts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/utils/dlx.mts b/src/utils/dlx.mts index 10f996799..33de29f97 100644 --- a/src/utils/dlx.mts +++ b/src/utils/dlx.mts @@ -25,10 +25,12 @@ import { spawn } from '@socketsecurity/registry/lib/spawn' import { getDefaultOrgSlug } from '../commands/ci/fetch-default-org-slug.mts' import constants, { + CI, FLAG_QUIET, FLAG_SILENT, NPM, PNPM, + VITEST, YARN, } from '../constants.mts' import { getErrorCause } from './errors.mts' @@ -275,9 +277,28 @@ export async function spawnCoanaDlx( spawnExtra, ) const output = await result.spawnPromise + // Print output when running in e2e-tests workflow for debugging. + if (CI && VITEST) { + if (output.stdout) { + console.log(output.stdout) + } + if (output.stderr) { + console.error(output.stderr) + } + } return { ok: true, data: output.stdout } } catch (e) { + const stdout = (e as any)?.stdout const stderr = (e as any)?.stderr + // Print output when running in e2e-tests workflow for debugging. + if (CI && VITEST) { + if (stdout) { + console.log(stdout) + } + if (stderr) { + console.error(stderr) + } + } const cause = getErrorCause(e) const message = stderr || cause return { From a43242f003d2e53c06d1f132ec3a3d4e7d4b08ad Mon Sep 17 00:00:00 2001 From: Martin Torp Date: Thu, 29 Jan 2026 14:56:29 +0100 Subject: [PATCH 2/2] respect the --silence flag --- src/utils/dlx.mts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/dlx.mts b/src/utils/dlx.mts index 33de29f97..48356c15e 100644 --- a/src/utils/dlx.mts +++ b/src/utils/dlx.mts @@ -278,7 +278,8 @@ export async function spawnCoanaDlx( ) const output = await result.spawnPromise // Print output when running in e2e-tests workflow for debugging. - if (CI && VITEST) { + // Respect the silent option from the caller. + if (CI && VITEST && !dlxOptions.silent) { if (output.stdout) { console.log(output.stdout) } @@ -291,7 +292,8 @@ export async function spawnCoanaDlx( const stdout = (e as any)?.stdout const stderr = (e as any)?.stderr // Print output when running in e2e-tests workflow for debugging. - if (CI && VITEST) { + // Respect the silent option from the caller. + if (CI && VITEST && !dlxOptions.silent) { if (stdout) { console.log(stdout) }