Skip to content

Commit

Permalink
Merge pull request #340 from fb55/patch-1
Browse files Browse the repository at this point in the history
Added a helpful error message when no logs are available
  • Loading branch information
mmalecki committed Sep 15, 2012
2 parents f69eb4d + 33dc125 commit 094ebd4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 094ebd4

Please sign in to comment.