Simplify check for whether lxc is installed [GH-186]
This commit is contained in:
parent
0e759e681b
commit
6066d22ad9
1 changed files with 4 additions and 6 deletions
|
@ -26,14 +26,12 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def ensure_lxc_installed!
|
def ensure_lxc_installed!
|
||||||
unless system("which lxc-version > /dev/null 2>&1")
|
|
||||||
begin
|
begin
|
||||||
sudo_wrapper.run("which", "lxc-version")
|
sudo_wrapper.run("which", "lxc-version")
|
||||||
rescue Vagrant::LXC::Errors::ExecuteError
|
rescue Vagrant::LXC::Errors::ExecuteError
|
||||||
raise Errors::LxcNotInstalled
|
raise Errors::LxcNotInstalled
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
# If the machine ID changed, then we need to rebuild our underlying
|
# If the machine ID changed, then we need to rebuild our underlying
|
||||||
# container.
|
# container.
|
||||||
|
|
Loading…
Add table
Reference in a new issue