Skip to content

Commit

Permalink
Check nested FileTask#out_of_date?
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Jan 23, 2017
1 parent 06bea3c commit 462e403
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/rake/file_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ def timestamp

# Are there any prerequisites with a later time than the given time stamp?
def out_of_date?(stamp)
@prerequisites.any? { |n| application[n, @scope].timestamp > stamp }
@prerequisites.any? { |p|
ptask = application[p, @scope]
if ptask.instance_of?(Rake::FileTask)
ptask.timestamp > stamp || ptask.needed?
else
ptask.timestamp > stamp
end
}
end

# ----------------------------------------------------------------
Expand Down

0 comments on commit 462e403

Please sign in to comment.