diff --git a/Gemfile.lock b/Gemfile.lock index 40d8bdc..147c7bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: rain (1.0.8) capistrano - rails (~> 3.2.8) + rails thor GEM diff --git a/lib/rain/git_tools.rb b/lib/rain/git_tools.rb index 4a14a2a..1b0f03e 100644 --- a/lib/rain/git_tools.rb +++ b/lib/rain/git_tools.rb @@ -85,7 +85,11 @@ def push_tag(tag) # what is/what would have been executed onto stdout. def run_cmd(cmd) puts "executing... #{cmd}" - %x(#{cmd}) unless ENV['RAILS_ENV'] == "test" + Bundler.with_clean_env { %x(#{cmd}) } unless testing? + end + + def testing? + ENV['RAILS_ENV'] == "test" end # Full path of the versions.yml file in the Rails app.