Sha256: d9fe77e0ddf8cfcfb89f7f3e15904de867a191234da121b819a7a610f6b6aa72
Contents?: true
Size: 1.09 KB
Versions: 29
Compression:
Stored size: 1.09 KB
Contents
require 'optparse' module Veewee module Command module Vagrant class Halt < ::Vagrant::Command::Base def execute options = {} opts = OptionParser.new do |opts| opts.banner = "Shutdown the basebox" opts.separator "" opts.separator "Usage: vagrant basebox halt <boxname>" opts.on("-f", "--force", "overwrite the basebox") do |f| options['force'] = f end opts.on("-d", "--debug", "enable debugging") do |d| options['debug'] = d end end # Parse the options argv = parse_options(opts) return if !argv raise ::Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length < 1 begin venv=Veewee::Environment.new(options) venv.ui=@env.ui venv.providers["virtualbox"].get_box(argv[0]).halt(options) rescue Veewee::Error => ex venv.ui.error(ex,:prefix => false) exit -1 end end end end end end
Version data entries
29 entries across 29 versions & 2 rubygems