From 5955c8ea0ce03c48abe3c3d232e74f2270600151 Mon Sep 17 00:00:00 2001 From: Richard Towers Date: Mon, 27 Dec 2021 15:52:10 +0000 Subject: [PATCH] Check assets:precompile is defined before enhancing 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 --- lib/tasks/cssbundling/build.rake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/cssbundling/build.rake b/lib/tasks/cssbundling/build.rake index 11e051a..1e3a9b0 100644 --- a/lib/tasks/cssbundling/build.rake +++ b/lib/tasks/cssbundling/build.rake @@ -7,7 +7,9 @@ namespace :css do end end -Rake::Task["assets:precompile"].enhance(["css:build"]) +if Rake::Task.task_defined?("assets:precompile") + Rake::Task["assets:precompile"].enhance(["css:build"]) +end if Rake::Task.task_defined?("test:prepare") Rake::Task["test:prepare"].enhance(["css:build"])