Merge pull request #410 from ChaosCloud/abk

vagrant-lxc-wrapper need to allow sudoer first-found binary path
This commit is contained in:
Virgil Dupras 2017-12-11 17:07:21 -05:00 committed by GitHub
commit d35ee4aed0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,9 +84,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