From 848383e081751ef66e125405dec40a71ae2f74f7 Mon Sep 17 00:00:00 2001 From: AbhishekKr Date: Wed, 11 May 2016 23:51:26 +0530 Subject: [PATCH] vagrant-lxc-wrapper need to allow sudoer first-found binary path sudoer PATH may have different order than current user --- lib/vagrant-lxc/command/sudoers.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb index 42b538a..266bff5 100644 --- a/lib/vagrant-lxc/command/sudoers.rb +++ b/lib/vagrant-lxc/command/sudoers.rb @@ -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