[Target] Always use a clean bundler env when using bundler.

This commit is contained in:
Eloy Durán
2014-12-11 21:03:08 +01:00
parent 948910c2a4
commit dadf725074

View File

@@ -122,8 +122,16 @@ module Motion; module Project
env_description = env.map { |k,v| "#{k}='#{v}'" }.join(' ')
puts "cd '#{@full_path}' && env #{env_description} #{command}"
end
Dir.chdir(@full_path) do
super(env, command)
if use_gemfile?
Bundler.with_clean_env do
Dir.chdir(@full_path) do
super(env, command)
end
end
else
Dir.chdir(@full_path) do
super(env, command)
end
end
end