Simplify check for whether lxc is installed [GH-186]

This commit is contained in:
Fabio Rehm 2013-12-17 22:59:32 -02:00
parent 0e759e681b
commit 6066d22ad9

View file

@ -26,12 +26,10 @@ module Vagrant
end
def ensure_lxc_installed!
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
begin
sudo_wrapper.run("which", "lxc-version")
rescue Vagrant::LXC::Errors::ExecuteError
raise Errors::LxcNotInstalled
end
end