Box add URL with windows drive letter works properly
This commit is contained in:
parent
d8ff2cb5ad
commit
7524e7a3c0
|
@ -22,6 +22,8 @@ BUG FIXES:
|
|||
fail to detect the box. [GH-1617]
|
||||
- In a multi-machine environment, a box not found won't be downloaded
|
||||
multiple times. [GH-1467]
|
||||
- `vagrant box add` with a file path now works correctly on Windows
|
||||
when a drive letter is specified.
|
||||
|
||||
## 1.2.1 (April 17, 2013)
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ module Vagrant
|
|||
@logger.info("Downloading box to: #{@temp_path}")
|
||||
|
||||
url = env[:box_url]
|
||||
if url !~ /^[a-z0-9]+:.*$/i
|
||||
@logger.info("No protocol found on box URL, assuming file:")
|
||||
if File.file?(url) || url !~ /^[a-z0-9]+:.*$/i
|
||||
@logger.info("URL is a file or protocol not found and assuming file.")
|
||||
file_path = File.expand_path(url)
|
||||
file_path = Util::Platform.cygwin_windows_path(file_path)
|
||||
url = "file:#{file_path}"
|
||||
|
|
Loading…
Reference in New Issue