2013-09-02 16:31:26 +00:00
|
|
|
require 'optparse'
|
|
|
|
|
|
|
|
require_relative "base"
|
|
|
|
require_relative "mixin_install_opts"
|
|
|
|
|
|
|
|
module VagrantPlugins
|
|
|
|
module CommandPlugin
|
|
|
|
module Command
|
|
|
|
class Update < Base
|
|
|
|
include MixinInstallOpts
|
|
|
|
|
|
|
|
def execute
|
|
|
|
opts = OptionParser.new do |o|
|
2014-01-06 06:33:05 +00:00
|
|
|
o.banner = "Usage: vagrant plugin update [names...] [-h]"
|
2013-09-02 16:31:26 +00:00
|
|
|
o.separator ""
|
|
|
|
end
|
|
|
|
|
|
|
|
# Parse the options
|
|
|
|
argv = parse_options(opts)
|
|
|
|
return if !argv
|
|
|
|
|
|
|
|
# Update the gem
|
|
|
|
action(Action.action_update, {
|
2014-05-22 16:35:12 +00:00
|
|
|
plugin_name: argv,
|
2013-09-02 16:31:26 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
# Success, exit status 0
|
|
|
|
0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|