summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rakefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index 36a8e9715b..f6d23b1908 100644
--- a/Rakefile
+++ b/Rakefile
@@ -46,10 +46,14 @@ task :register_eventlog do
end
-require "chefstyle"
-require "rubocop/rake_task"
-RuboCop::RakeTask.new(:style) do |task|
- task.options += ["--display-cop-names", "--no-color"]
+begin
+ require "chefstyle"
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new(:style) do |task|
+ task.options += ["--display-cop-names", "--no-color"]
+ end
+rescue
+ puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
end
begin