Skip to content

Commit

Permalink
Merge pull request #67 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(exec): also set empty string on errors
  • Loading branch information
jlenon7 authored Aug 29, 2023
2 parents 68b6569 + 8754b12 commit eb8a6e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/common",
"version": "4.8.0",
"version": "4.9.0",
"description": "The Athenna common helpers to use in any Node.js ESM project.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down
8 changes: 8 additions & 0 deletions src/helpers/Exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export class Exec {

return result
} catch (error) {
if (!error.stdout) {
error.stdout = ''
}

if (!error.stderr) {
error.stderr = ''
}

debug('command has failed')
debug('command stdout: %s', error.stdout)
debug('command stderr: %s', error.stderr)
Expand Down

0 comments on commit eb8a6e8

Please sign in to comment.