Skip to content

Commit a1d4c6b

Browse files
Check assets:precompile is defined before enhancing (#59)
a749ca2 suggests that "Sprockets is not a dependency", so we should not assume that the assets:precompile task will be defined. If it's not there, we should just skip enhancing it. Fixes #58
1 parent 4d69dfc commit a1d4c6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/tasks/cssbundling/build.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ namespace :css do
77
end
88
end
99

10-
Rake::Task["assets:precompile"].enhance(["css:build"])
10+
if Rake::Task.task_defined?("assets:precompile")
11+
Rake::Task["assets:precompile"].enhance(["css:build"])
12+
end
1113

1214
if Rake::Task.task_defined?("test:prepare")
1315
Rake::Task["test:prepare"].enhance(["css:build"])

0 commit comments

Comments
 (0)