diff --git a/CHANGELOG.md b/CHANGELOG.md index 84bdeac63..04c8f48da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,6 +72,7 @@ BUG FIXES: retry from scratch [GH-4479] - core: line numbers show properly in Vagrantfile syntax errors on Windows [GH-6445] + - commands/box: add command with `~` paths on Windows works [GH-5747] - commands/box: the update command supports CA settings [GH-4473] - commands/box: removing all versions and providers of a box will properly clean all directories in `~/.vagrant.d/boxes` [GH-3570] diff --git a/lib/vagrant/action/builtin/box_add.rb b/lib/vagrant/action/builtin/box_add.rb index 097de905d..6537937da 100644 --- a/lib/vagrant/action/builtin/box_add.rb +++ b/lib/vagrant/action/builtin/box_add.rb @@ -381,7 +381,8 @@ module Vagrant @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}" + file_path = file_path.gsub("\\", "/") + url = "file://#{file_path}" end # If the temporary path exists, verify it is not too old. If its