summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-14 11:56:23 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-14 11:56:23 -0800
commit396793867a801a82604adb1ab27bbd6f8eb065c5 (patch)
tree114a70ec733d468afd14757c003817ce8f3c8ac4 /Rakefile
parent652c10fd512997a1fe160537c45072dbf0f528de (diff)
downloadchef-396793867a801a82604adb1ab27bbd6f8eb065c5.tar.gz
make chefstyle optional
if you 'bundle install --without development test' then the Rakefile will be broken without this. breaks appbundle-updater, so not sure how our kitchen tests are passing...
Diffstat (limited to 'Rakefile')
-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