vagrant-lxc-wrapper need to allow sudoer first-found binary path

sudoer PATH may have different order than current user
This commit is contained in:
AbhishekKr 2016-05-11 23:51:26 +05:30
parent aa5fb7a932
commit 848383e081

View file

@ -80,9 +80,9 @@ module Vagrant
def build_cmd_paths_hash
{}.tap do |hash|
%w( which cat mkdir cp chown chmod rm tar chown ip ifconfig brctl ).each do |cmd|
hash[cmd] = `which #{cmd}`.strip
hash[cmd] = `sudo which #{cmd}`.strip
end
hash['lxc_bin'] = Pathname(`which lxc-create`.strip).parent.to_s
hash['lxc_bin'] = Pathname(`sudo which lxc-create`.strip).parent.to_s
hash['ruby'] = Gem.ruby
end
end