Merge pull request #9518 from briancain/fix-package-cmd-wsl

Convert to windows path if on WSL during vbox export
This commit is contained in:
Brian Cain 2018-02-28 08:07:56 -08:00 committed by GitHub
commit ac37b67eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,5 @@
require "fileutils"
require 'vagrant/util/platform'
module VagrantPlugins
module ProviderVirtualBox
@ -32,7 +33,15 @@ module VagrantPlugins
end
def ovf_path
File.join(@env["export.temp_dir"], "box.ovf")
path = File.join(@env["export.temp_dir"], "box.ovf")
# If we're within WSL, we should use the correct path rather than
# the mnt path. GH-9059
if Vagrant::Util::Platform.wsl?
path = Vagrant::Util::Platform.wsl_to_windows_path(path)
end
return path
end
end
end