Vagrantfile: Check for OS before patching the lxc-config.

Followup of e68b45d089
Without this vagrant up will fail on Windows.
https://chat.zulip.org/#narrow/stream/development.20help/topic/
Vagrant.20up.20error
This commit is contained in:
Vishnu Ks 2018-02-16 23:43:54 +05:30 committed by Greg Price
parent b12a5a2da0
commit 718b3fcd6a
1 changed files with 19 additions and 17 deletions

2
Vagrantfile vendored
View File

@ -31,6 +31,7 @@ end
# have the box (e.g. on first setup), Vagrant would download it but too # 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 # late for us to patch it like this; so we prompt them to explicitly add it
# first and then rerun. # first and then rerun.
if Vagrant::Util::Platform.linux?
if ['up', 'provision'].include? ARGV[0] if ['up', 'provision'].include? ARGV[0]
LXC_VERSION = `lxc-ls --version`.strip unless defined? LXC_VERSION LXC_VERSION = `lxc-ls --version`.strip unless defined? LXC_VERSION
if LXC_VERSION == "2.1.0" if LXC_VERSION == "2.1.0"
@ -53,6 +54,7 @@ if ['up', 'provision'].include? ARGV[0]
end end
end end
end end
end
# Workaround: Vagrant removed the atlas.hashicorp.com to # Workaround: Vagrant removed the atlas.hashicorp.com to
# vagrantcloud.com redirect in February 2018. The value of # vagrantcloud.com redirect in February 2018. The value of