diff --git a/package-lock.json b/package-lock.json index d736afb..359f3b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@athenna/common", - "version": "4.8.0", + "version": "4.9.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@athenna/common", - "version": "4.8.0", + "version": "4.9.0", "license": "MIT", "dependencies": { "@fastify/formbody": "^7.4.0", diff --git a/package.json b/package.json index 167a28b..c7d3aca 100644 --- a/package.json +++ b/package.json @@ -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 ", diff --git a/src/helpers/Exec.ts b/src/helpers/Exec.ts index ef07c00..cafbccc 100644 --- a/src/helpers/Exec.ts +++ b/src/helpers/Exec.ts @@ -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)