File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,12 @@ import { spawn } from '@socketsecurity/registry/lib/spawn'
2525
2626import { getDefaultOrgSlug } from '../commands/ci/fetch-default-org-slug.mts'
2727import constants , {
28+ CI ,
2829 FLAG_QUIET ,
2930 FLAG_SILENT ,
3031 NPM ,
3132 PNPM ,
33+ VITEST ,
3234 YARN ,
3335} from '../constants.mts'
3436import { getErrorCause } from './errors.mts'
@@ -275,9 +277,28 @@ export async function spawnCoanaDlx(
275277 spawnExtra ,
276278 )
277279 const output = await result . spawnPromise
280+ // Print output when running in e2e-tests workflow for debugging.
281+ if ( CI && VITEST ) {
282+ if ( output . stdout ) {
283+ console . log ( output . stdout )
284+ }
285+ if ( output . stderr ) {
286+ console . error ( output . stderr )
287+ }
288+ }
278289 return { ok : true , data : output . stdout }
279290 } catch ( e ) {
291+ const stdout = ( e as any ) ?. stdout
280292 const stderr = ( e as any ) ?. stderr
293+ // Print output when running in e2e-tests workflow for debugging.
294+ if ( CI && VITEST ) {
295+ if ( stdout ) {
296+ console . log ( stdout )
297+ }
298+ if ( stderr ) {
299+ console . error ( stderr )
300+ }
301+ }
281302 const cause = getErrorCause ( e )
282303 const message = stderr || cause
283304 return {
You can’t perform that action at this time.
0 commit comments