From 6066d22ad9ef45745a655099a26b7c4e87c670e8 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Tue, 17 Dec 2013 22:59:32 -0200 Subject: [PATCH] Simplify check for whether lxc is installed [GH-186] --- lib/vagrant-lxc/provider.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/vagrant-lxc/provider.rb b/lib/vagrant-lxc/provider.rb index 2ad6dfe..abde513 100644 --- a/lib/vagrant-lxc/provider.rb +++ b/lib/vagrant-lxc/provider.rb @@ -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