diff --git a/lib/vagrant/communication/ssh.rb b/lib/vagrant/communication/ssh.rb index a1495ebf7..8498b696b 100644 --- a/lib/vagrant/communication/ssh.rb +++ b/lib/vagrant/communication/ssh.rb @@ -172,7 +172,8 @@ module Vagrant # Determine the shell to execute. If we are using `sudo` then we # need to wrap the shell in a `sudo` call. - shell = "sudo -H #{@vm.config.ssh.shell}" if sudo + shell = @vm.config.ssh.shell + shell = "sudo -H #{shell}" if sudo # Open the channel so we can execute or command channel = connection.open_channel do |ch|