Skip to content

Commit 9f96f62

Browse files
author
Norbert Piskorz
authored
Merge pull request #44 from robinfehr/improvement/better-shell-logs
improve logs for shell scripts
2 parents eeb180d + de1a399 commit 9f96f62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/executeScript.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const executeScript = _.curry((
1212
return debugCb(debug, cb)();
1313
}
1414
debug('Executing command', command);
15-
exec(command, {silent: true, async: true}, debugCb(debug, cb));
15+
exec(command, {silent: true, async: true}, (code, stdout, stderr) => {
16+
const errMsg = `errCode: ${code}, stdout: ${stdout}, stderr: ${stderr}`;
17+
debugCb(debug, cb)(errMsg, stdout);
18+
});
1619
});
1720

1821
module.exports = executeScript;

0 commit comments

Comments
 (0)