(command: string, input?: string)
| 113 | } |
| 114 | |
| 115 | export async function mzcompose(command: string, input?: string) { |
| 116 | return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => { |
| 117 | const childProccess = exec( |
| 118 | `${COMPOSE_PATH} ${command}`, |
| 119 | { cwd: TESTDRIVE_PATH }, |
| 120 | (error, stdout, stderr) => { |
| 121 | if (error) { |
| 122 | reject(error); |
| 123 | return; |
| 124 | } |
| 125 | resolve({ stdout, stderr }); |
| 126 | }, |
| 127 | ); |
| 128 | if (input) { |
| 129 | childProccess.stdin?.write(input); |
| 130 | childProccess.stdin?.end(); |
| 131 | } |
| 132 | }); |
| 133 | } |
no test coverage detected