( command: string, exitCode: number, stdout: string, stderr: string, )
| 122 | * Interpret command result based on semantic rules |
| 123 | */ |
| 124 | export function interpretCommandResult( |
| 125 | command: string, |
| 126 | exitCode: number, |
| 127 | stdout: string, |
| 128 | stderr: string, |
| 129 | ): { |
| 130 | isError: boolean |
| 131 | message?: string |
| 132 | } { |
| 133 | const semantic = getCommandSemantic(command) |
| 134 | const result = semantic(exitCode, stdout, stderr) |
| 135 | |
| 136 | return { |
| 137 | isError: result.isError, |
| 138 | message: result.message, |
| 139 | } |
| 140 | } |
no test coverage detected