From 424c887a27f954e91b8fa21ebcdc8fae70f74ebd Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 16 Feb 2018 11:11:22 -0800 Subject: [PATCH] Vagrantfile: Test directly for `lxc-ls`. This avoids giving the same "no such command" error on Linux machines that don't have LXC installed as we now avoid on non-Linux. --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 1a53b17e5c..eb39bdb3e7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -31,8 +31,8 @@ end # have the box (e.g. on first setup), Vagrant would download it but too # late for us to patch it like this; so we prompt them to explicitly add it # first and then rerun. -if Vagrant::Util::Platform.linux? - if ['up', 'provision'].include? ARGV[0] +if ['up', 'provision'].include? ARGV[0] + if command? "lxc-ls" LXC_VERSION = `lxc-ls --version`.strip unless defined? LXC_VERSION if LXC_VERSION == "2.1.0" lxc_config_file = ENV['HOME'] + "/.vagrant.d/boxes/fgrehm-VAGRANTSLASH-trusty64-lxc/1.2.0/lxc/lxc-config"