diff --git a/plugins/commands/box/command/repackage.rb b/plugins/commands/box/command/repackage.rb index fc19a5d2d..794c5ed48 100644 --- a/plugins/commands/box/command/repackage.rb +++ b/plugins/commands/box/command/repackage.rb @@ -1,15 +1,14 @@ require "fileutils" require 'optparse' +require "pathname" module VagrantPlugins module CommandBox module Command class Repackage < Vagrant.plugin("2", :command) def execute - options = {} - - opts = OptionParser.new do |opts| - opts.banner = "Usage: vagrant box repackage " + opts = OptionParser.new do |o| + o.banner = "Usage: vagrant box repackage " end # Parse the options @@ -32,7 +31,7 @@ module VagrantPlugins raise Vagrant::Errors::BoxNotFound, :name => box_name if !box # Repackage the box - output_path = File.expand_path(@env.config.global.package.name, FileUtils.pwd) + output_path = Pathname.new(File.expand_path(@env.config_global.package.name, FileUtils.pwd)) box.repackage(output_path) # Success, exit status 0