* when both "render" and "report" were implemented, check whether it's a terminal. * if it's a terminal, use "render", if not, use "report" because "report" is just a string
()
| 37 | * if it's a terminal, use "render", if not, use "report" because "report" is just a string |
| 38 | */ |
| 39 | private shouldRunRender() { |
| 40 | const isTerminal = process.stdout.isTTY; |
| 41 | if (this.command.report && !isTerminal) { |
| 42 | return false; |
| 43 | } |
| 44 | return Boolean(this.command.render); |
| 45 | } |
| 46 | |
| 47 | private async runJsonHandler() { |
| 48 | if (!this.flags.json) return null; |