Skip to content

Commit

Permalink
Merge pull request #66 from AthennaIO/develop
Browse files Browse the repository at this point in the history
chore(exec): set empty string when undefined
  • Loading branch information
jlenon7 authored Aug 29, 2023
2 parents 446cb94 + e3e1a4c commit 68b6569
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.7.0",
"version": "4.8.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 @@ -65,6 +65,14 @@ export class Exec {

const result = await exec(command, execOptions)

if (!result.stdout) {
result.stdout = ''
}

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

debug('command executed successfully')
debug('command stdout: %s', result.stdout)
debug('command stderr: %s', result.stderr)
Expand Down

0 comments on commit 68b6569

Please sign in to comment.