Sha256: 0d2a7cf3d4cd534e6363348dc05fd9c8db8a71f8639005e81cbc0ad737600e32
Contents?: true
Size: 1.16 KB
Versions: 4
Compression:
Stored size: 1.16 KB
Contents
require 'optparse' module Veewee module Command module Vagrant class Validate < ::Vagrant::Command::Base def execute options = {} opts = OptionParser.new do |opts| opts.banner = "Validates a box against vagrant compliancy rules" opts.separator "" opts.separator "Usage: vagrant basebox validate <boxname>" opts.on("-d", "--debug", "enable debugging") do |d| options['debug'] = d end opts.on("-f", "--force", "force overwrite") do |f| options['force'] = f 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 box_name=argv[0] venv.providers["virtualbox"].get_box(box_name).validate_vagrant(options) rescue Veewee::Error => ex venv.ui.error(ex,:prefix => false) exit -1 end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems