Merge pull request #186 from vStone/bugfix/185-detect-lxc-different-root-path
Attempt to find the lxc-version command using sudo if not in default PATH (Fixes #195)
This commit is contained in:
commit
0e759e681b
1 changed files with 6 additions and 2 deletions
|
@ -26,10 +26,14 @@ module Vagrant
|
|||
end
|
||||
|
||||
def ensure_lxc_installed!
|
||||
unless system("which lxc-version > /dev/null")
|
||||
unless system("which lxc-version > /dev/null 2>&1")
|
||||
begin
|
||||
sudo_wrapper.run("which", "lxc-version")
|
||||
rescue Vagrant::LXC::Errors::ExecuteError
|
||||
raise Errors::LxcNotInstalled
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# If the machine ID changed, then we need to rebuild our underlying
|
||||
# container.
|
||||
|
|
Loading…
Reference in a new issue