Adjust provisioner to upload file before modifying it

This commit is contained in:
Chris Roberts 2022-06-13 15:57:32 -07:00
parent 255c75eeba
commit 555d8ae7a3

View File

@ -111,12 +111,11 @@ module VagrantPlugins
raise Vagrant::Errors::SSHNotReady if info.nil?
end
comm.upload(path.to_s, upload_path)
user = info[:username]
comm.sudo("chown -R #{user} #{upload_path}",
error_check: false)
comm.upload(path.to_s, upload_path)
if config.name
@machine.ui.detail(I18n.t("vagrant.provisioners.shell.running",
script: "script: #{config.name}"))