Merge pull request #393 from mayflower/fix-sudo-wrapper

fix sudo wrapper
This commit is contained in:
Franz Pletz 2015-09-24 15:27:40 +02:00
commit 81d70d26d3

View file

@ -13,8 +13,12 @@ module Vagrant
def run(*command) def run(*command)
options = command.last.is_a?(Hash) ? command.last : {} options = command.last.is_a?(Hash) ? command.last : {}
command.unshift @wrapper_path if @wrapper_path && !options[:no_wrapper] if @wrapper_path && !options[:no_wrapper]
execute *(['sudo', '/usr/bin/env'] + command) command.unshift @wrapper_path
execute *(['sudo'] + command)
else
execute *(['sudo', '/usr/bin/env'] + command)
end
end end
private private