Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

cypress: log stdout/stderr when docker exec fails #9154

Merged
merged 1 commit into from
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions cypress/plugins/docker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
}
Expand Down