Skip to content

Commit fa6151d

Browse files
authored
Check assets:clobber is defined before enhancing (#71)
a749ca2 suggests that "Sprockets is not a dependency", so we should not assume that the assets:precompile AND assets:clobber tasks will be defined. If it's not there, we should just skip enhancing it. Related to: #59
1 parent 8af4604 commit fa6151d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/tasks/cssbundling/clobber.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ namespace :css do
55
end
66
end
77

8-
Rake::Task["assets:clobber"].enhance(["css:clobber"])
8+
if Rake::Task.task_defined?("assets:clobber")
9+
Rake::Task["assets:clobber"].enhance(["css:clobber"])
10+
end

0 commit comments

Comments
 (0)