diff --git a/packages/docker-compose-js/src/index.ts b/packages/docker-compose-js/src/index.ts index 5be618cf8e2..aa03c5ff53a 100644 --- a/packages/docker-compose-js/src/index.ts +++ b/packages/docker-compose-js/src/index.ts @@ -96,15 +96,13 @@ export class Compose { error.stdout = stdout; reject(error); } else { - // sometimes a command is successful (no error), but prints a failure - // of some kind to stderr. It may also print to stdout, so return both. - if (stderr && stdout) { - resolve(`stdout: ${stdout}, stderr: ${stderr}`); - } - if (stderr) { + // sometimes a command is successful (no error), but prints a failure of + // some kind to stderr. If no stdout, return stderr instead. + if (stdout) { + resolve(stdout); + } else { resolve(stderr); } - resolve(stdout); } }); }