We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 015286d + abf5e26 commit e45cfc0Copy full SHA for e45cfc0
lib/rake/file_task.rb
@@ -14,14 +14,18 @@ class FileTask < Task
14
# Is this file task needed? Yes if it doesn't exist, or if its time stamp
15
# is out of date.
16
def needed?
17
- !File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
+ begin
18
+ out_of_date?(File.mtime(name)) || @application.options.build_all
19
+ rescue Errno::ENOENT
20
+ true
21
+ end
22
end
23
24
# Time stamp for file task.
25
def timestamp
- if File.exist?(name)
- File.mtime(name.to_s)
- else
26
27
+ File.mtime(name)
28
29
Rake::LATE
30
31
0 commit comments