Merge pull request #393 from mayflower/fix-sudo-wrapper
fix sudo wrapper
This commit is contained in:
commit
81d70d26d3
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue