Skip to content

Commit

Permalink
Replace newlines with spaces so messages can fit the alert ui. Fix #112
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioschneider committed Jul 1, 2015
1 parent bb02dfd commit 0e35d7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/agent/actions/alert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ exports.start = function(opts, cb) {
emitter = null;
}

// remove newlines so the message can be completely displayed
message = message.replace(/(\r\n|\n|\r)/gm," ");

args.push(message);
system.spawn_as_logged_user(bin, args, function(err, alert) {
if (err) return done(err);
Expand Down

0 comments on commit 0e35d7b

Please sign in to comment.