Class: VagrantBundler::Command::BundleShow

Inherits:
Base
  • Object
show all
Defined in:
lib/vagrant_bundler/command/bundle_show.rb

Instance Method Summary collapse

Instance Method Details

#executeObject

Raises:

  • (Vagrant::Errors::CLIInvalidUsage)


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/vagrant_bundler/command/bundle_show.rb', line 6

def execute
  opts = OptionParser.new do |opts|
    opts.banner = "Show the path to a bundle gem on the vagrant box"
    opts.separator ""
    opts.separator "Usage: vagrant bundle show <gem_name>"
  end

  # Parse the options
  argv = parse_options(opts)

  return if !argv

  raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1

  @env.ui.info locate_gem(argv[0])
end