summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-14 12:08:33 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-14 12:08:33 -0800
commitace13326f339faeba82d59c14f4f48d4ff5f3d05 (patch)
treeb310d236e56f14c61c54fc65d591a74800036ed8
parent652c10fd512997a1fe160537c45072dbf0f528de (diff)
parent150f381ecc81e108c2a4d7368de82ddf729994ed (diff)
downloadchef-ace13326f339faeba82d59c14f4f48d4ff5f3d05.tar.gz
Merge pull request #4408 from chef/lcg/optional-chefstyle
make chefstyle optional in the Rakefile
-rw-r--r--Rakefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Rakefile b/Rakefile
index 36a8e9715b..b80dd9a846 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 LoadError
+ puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
end
begin