mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
fix: ANSI escape codes with --watch #3884
The escape code should be \033, but that doesn't work in strict mode, probably because of that it was changed to \\033 which isn't valid either.
This commit is contained in:
parent
2833774d7f
commit
a5dc8fa7ff
@ -589,8 +589,8 @@ class API {
|
||||
if (opts && opts.rawArgs && opts.rawArgs.indexOf('--watch') > -1) {
|
||||
var moment = require('moment');
|
||||
function show() {
|
||||
process.stdout.write('\\033[2J');
|
||||
process.stdout.write('\\033[0f');
|
||||
process.stdout.write('\x1b[2J');
|
||||
process.stdout.write('\x1b[0f');
|
||||
console.log('Last refresh: ', moment().format('LTS'));
|
||||
that.Client.executeRemote('getMonitorData', {}, function(err, list) {
|
||||
UX.dispAsTable(list, null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user