Permalink
Browse files

added a helpful error message

when no logs are available

fixes #329
  • Loading branch information...
1 parent f69eb4d commit 33dc1251fda63b30cca319036f3e7d5e5550017c @fb55 fb55 committed Sep 15, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/forever.js
View
@@ -536,6 +536,10 @@ forever.tail = function (target, length, callback) {
var procs = forever.findByIndex(target, processes)
|| forever.findByScript(target, processes);
+ if (!procs) {
+ return callback(new Error('No logs available for process: ' + target));
+ }
+
async.mapSeries(procs, tailProcess, function (err, procs) {
return err
? callback(err)

0 comments on commit 33dc125

Please sign in to comment.