mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
cypress: log stdout/stderr when docker exec fails (#9154)
Otherwise you cannot debug anything with errors like: ``` > Command failed: docker exec 134c9a0afd7dadd0b82ce69b4d72d3d6d8ca1b211540d4390a88357b68fa03b9 pg_isready -U postgres ``` Now we include the stdout/err prior to logging this.
This commit is contained in:
parent
5a9c2e530a
commit
147ec49ff5
1 changed files with 8 additions and 3 deletions
|
@ -61,9 +61,14 @@ export function dockerExec(args: {
|
|||
childProcess.execFile("docker", [
|
||||
"exec", args.containerId,
|
||||
...args.params,
|
||||
], { encoding: 'utf8' }, err => {
|
||||
if (err) reject(err);
|
||||
else resolve();
|
||||
], { encoding: 'utf8' }, (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue