(step: string, args: string[], result: CliJsonResult)
| 38 | } |
| 39 | |
| 40 | export function formatResultDebug(step: string, args: string[], result: CliJsonResult): string { |
| 41 | const jsonText = |
| 42 | result.json === undefined ? '(unparseable)' : JSON.stringify(result.json, null, 2); |
| 43 | return [ |
| 44 | `step: ${step}`, |
| 45 | `command: agent-device ${args.join(' ')}`, |
| 46 | `status: ${result.status}`, |
| 47 | `stderr:`, |
| 48 | result.stderr || '(empty)', |
| 49 | `stdout:`, |
| 50 | result.stdout || '(empty)', |
| 51 | `json:`, |
| 52 | jsonText, |
| 53 | ].join('\n'); |
| 54 | } |
| 55 | |
| 56 | function cliJsonResult(result: ExecResult): CliJsonResult { |
| 57 | let json: any; |
no outgoing calls