From ac2a6fbf62b584a8325a665a9e7b368388bc7df6 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Tue, 7 Oct 2025 21:27:51 +0100 Subject: [PATCH] Rescue RuboCop rake tasks require error (#1431) On Ruby's CI, RuboCop is not installed and not needed. So we should rescue the error to allow it to still run tests with Rake. --- Rakefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index be997bf300..cd8f2d9788 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,12 @@ $:.unshift File.expand_path('lib', __dir__) # default template dir require_relative 'lib/rdoc/task' require 'bundler/gem_tasks' require 'rake/testtask' -require 'rubocop/rake_task' + +begin + require 'rubocop/rake_task' +rescue LoadError + puts "RuboCop is not installed" +end task :test => [:normal_test, :rubygems_test]