mirror of
https://github.com/redhat-actions/buildah-build.git
synced 2025-06-08 10:01:34 +00:00
add debug logs
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
This commit is contained in:
parent
3c136d27ac
commit
20c4f351ec
4 changed files with 29 additions and 22 deletions
|
@ -60,18 +60,17 @@ class BuildahCli {
|
|||
}
|
||||
let output = '';
|
||||
let error = '';
|
||||
const options = {
|
||||
listeners: {
|
||||
stdout: (data) => {
|
||||
output += data.toString();
|
||||
},
|
||||
stderr: (data) => {
|
||||
error += data.toString();
|
||||
}
|
||||
const options = {};
|
||||
options.listeners = {
|
||||
stdout: (data) => {
|
||||
output += data.toString();
|
||||
},
|
||||
stderr: (data) => {
|
||||
error += data.toString();
|
||||
}
|
||||
};
|
||||
yield exec.exec(`${this.executable}`, args, options);
|
||||
if (error) {
|
||||
const exitCode = yield exec.exec(this.executable, args, options);
|
||||
if (exitCode === 1) {
|
||||
return Promise.resolve({ succeeded: false, error: error });
|
||||
}
|
||||
return Promise.resolve({ succeeded: true, output: output });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue