core: BoxAdd expands URL paths

This commit is contained in:
Mitchell Hashimoto 2014-01-24 13:10:27 -08:00
parent d40ff9c390
commit fa77d6810f
1 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,16 @@ module Vagrant
def call(env)
@download_interrupted = false
url = Array(env[:box_url])
url = Array(env[:box_url]).map do |u|
next u if u =~ /^[a-z0-9]+:.*$/i
# Expand the path and try to use that, if possible
p = File.expand_path(u)
p = Util::Platform.cygwin_windows_path(p)
next p if File.file?(p)
u
end
# If we received a shorthand URL ("mitchellh/precise64"),
# then expand it properly.