We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cef628d + 49c2824 commit f8e312eCopy full SHA for f8e312e
lib/API/UX/pm2-describe.js
@@ -176,7 +176,10 @@ module.exports = function(proc) {
176
Object.keys(diff_env).forEach(function(key) {
177
var obj = {}
178
if (_env[key]) {
179
- obj[key] = _env[key].slice(0, process.stdout.columns - 60)
+ // 1. fix env value is not a String and slice is undeinfed
180
+ // 2. fix process.stdout.columns is undefined and causes empty string output
181
+ // 3. columns defaults to 300 - same as specified in pm2-ls
182
+ obj[key] = String(_env[key]).slice(0, (process.stdout.columns || 300) - 60)
183
UxHelpers.safe_push(table_env, obj)
184
}
185
})
0 commit comments