Sha256: 833c8816745b88a4113063179e2e54e445c18794bfdbbd823a3f12763eb54904

Contents?: true

Size: 880 Bytes

Versions: 22

Compression:

Stored size: 880 Bytes

Contents

require 'optparse'

require_relative "base"
require_relative "mixin_install_opts"

module VagrantPlugins
  module CommandPlugin
    module Command
      class Update < Base
        include MixinInstallOpts

        def execute
          options = {}
          opts = OptionParser.new do |o|
            o.banner = "Usage: vagrant plugin update [names...] [-h]"
            o.separator ""

            o.on("--local", "Update plugin in local project") do |l|
              options[:env_local] = l
            end
          end

          # Parse the options
          argv = parse_options(opts)
          return if !argv

          # Update the gem
          action(Action.action_update, {
            plugin_name:        argv,
            env_local:          options[:env_local]
          })

          # Success, exit status 0
          0
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
vagrant-unbundled-2.3.6.0 plugins/commands/plugin/command/update.rb
tamtam-vagrant-reload-1.2.1 vendor/cache/vagrant-2092df529ae7/plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.3.3.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.3.2.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.19.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.18.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.16.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.14.0 plugins/commands/plugin/command/update.rb
vagrant-aws-mkubenka-0.7.2.pre.24 vendor/bundle/ruby/2.7.0/bundler/gems/vagrant-22795b161bf6/plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.10.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.9.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.8.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.7.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.6.2 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.6.1 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.6.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.5.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.4.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.3.0 plugins/commands/plugin/command/update.rb
vagrant-unbundled-2.2.2.0 plugins/commands/plugin/command/update.rb