fix sudo wrapper

This commit is contained in:
Robin Gloster 2015-09-23 18:15:28 +00:00
parent 050c160de2
commit 4c969a6ae7

View file

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