From 555d8ae7a3670d36f700b9950a9e4e60c40c5fe3 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 13 Jun 2022 15:57:32 -0700 Subject: [PATCH] Adjust provisioner to upload file before modifying it --- plugins/provisioners/shell/provisioner.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb index 477cf81d9..74191f091 100644 --- a/plugins/provisioners/shell/provisioner.rb +++ b/plugins/provisioners/shell/provisioner.rb @@ -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}"))