Commit 67d574d9 by UmanShahzad

Break up finding non-installed plugins into separate function.

parent fe7b1840
# -*- mode: ruby -*-
# vi: set ft=ruby :
def install_plugins(plugins)
not_installed = []
plugins.each do |plugin|
unless Vagrant.has_plugin?(plugin)
not_installed << plugin
end
end
not_installed = get_not_installed plugins
if not_installed.any?
puts "The following required plugins must be installed:"
puts "'#{not_installed.join("', '")}'"
......@@ -22,6 +13,16 @@ def install_plugins(plugins)
end
end
def get_not_installed(plugins)
not_installed = []
plugins.each do |plugin|
unless Vagrant.has_plugin?(plugin)
not_installed << plugin
end
end
return not_installed
end
def install_plugin(plugin)
system "vagrant plugin install #{plugin}"
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment