From 9e0b45841baff3d212b0422e1d860f5eac98c20d Mon Sep 17 00:00:00 2001 From: Nazar Holubovskyy Date: Fri, 4 Sep 2020 23:42:12 +0100 Subject: [PATCH] Enh: Vagrant process is not interrupted, now, after the installation of each plugin (#227) --- Vagrantfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 99c2a78..73a04c7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,9 +1,19 @@ require 'yaml' require 'fileutils' +required_plugins_installed = nil required_plugins = %w( vagrant-hostmanager vagrant-vbguest ) required_plugins.each do |plugin| - exec "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin + unless Vagrant.has_plugin? plugin + system "vagrant plugin install #{plugin}" + required_plugins_installed = true + end +end + +# IF plugin[s] was just installed - restart required +if required_plugins_installed + system "vagrant up" + exit end domains = {