diff --git a/lib/kitchen/driver/vagrant.rb b/lib/kitchen/driver/vagrant.rb index c0b2a818..f05ae60b 100644 --- a/lib/kitchen/driver/vagrant.rb +++ b/lib/kitchen/driver/vagrant.rb @@ -92,8 +92,11 @@ class Vagrant < Kitchen::Driver::Base driver.windows_os? ? "/omnibus/cache" : "/tmp/omnibus/cache" end + # for use with vagrant on WSL + user_home = ENV["VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH"].nil? ? "~" : ENV["VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH"] + default_config :kitchen_cache_directory, - File.expand_path("~/.kitchen/cache") + File.expand_path("#{user_home}/.kitchen/cache") default_config :cachier, nil