Skip to content

Commit

Permalink
Prevent errors when running Rake tasks due to "kitchen" gem not being…
Browse files Browse the repository at this point in the history
… available
  • Loading branch information
karmi committed Jan 5, 2015
1 parent 8f01ccb commit 0e2fc18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ end
desc 'Run all style checks'
task style: ['style:chef', 'style:ruby']

require 'kitchen'
desc 'Run Test Kitchen integration tests'
task :integration do
require 'kitchen'
Kitchen.logger = Kitchen.default_file_logger
sh 'kitchen test -c'
end
Expand All @@ -58,6 +58,6 @@ task default: ['style', 'spec', 'integration']
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
rescue LoadError, Kitchen::ClientError
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
end

0 comments on commit 0e2fc18

Please sign in to comment.