Set remote script extension from local script extension

This commit is contained in:
Jeff Bonhag 2020-02-13 16:59:37 -05:00 committed by Chris Roberts
parent b6e8262bf2
commit b2aa16dc78

View File

@ -136,7 +136,7 @@ module VagrantPlugins
@machine.communicate.tap do |comm|
env = config.env.map{|k,v| comm.generate_environment_export(k, v)}.join
if File.extname(upload_path).empty?
remote_ext = @machine.config.winssh.shell == "powershell" ? "ps1" : "bat"
remote_ext = File.extname(path)[1..-1]
upload_path << ".#{remote_ext}"
end
if remote_ext == "ps1"