MCPcopy Create free account
hub / github.com/engineer-man/piston / step

Function step

cli/commands/execute.js:65–86  ·  view source on GitHub ↗
(name, ctx)

Source from the content-addressed store, hash-verified

63 response = response.data
64
65 function step(name, ctx){
66 console.log(chalk.bold(`== ${name} ==`))
67 if(ctx.stdout){
68 console.log(" ",chalk.bold(`STDOUT`))
69 console.log(" ",ctx.stdout.replace(/\n/g,'\n '))
70 }
71 if(ctx.stderr){
72 console.log(chalk.bold(`STDERR`))
73 console.log(" ",ctx.stderr.replace(/\n/g,'\n '))
74 }
75
76 if(ctx.code)
77 console.log(
78 chalk.bold(`Exit Code:`),
79 chalk.bold[ctx.code > 0 ? 'red' : 'green'](ctx.code)
80 )
81 if(ctx.signal)
82 console.log(
83 chalk.bold(`Signal:`),
84 chalk.bold.yellow(ctx.signal)
85 )
86 }
87
88
89

Callers 1

execute.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected