Permalink
Browse files

Merge pull request #340 from fb55/patch-1

Added a helpful error message when no logs are available
  • Loading branch information...
2 parents f69eb4d + 33dc125 commit 094ebd41d4ca90b211fbfde81349b93657d69b0a @mmalecki mmalecki 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 094ebd4

Please sign in to comment.