From 1091b4cb5455a998d505af26885a1443d55efc20 Mon Sep 17 00:00:00 2001 From: Matthijs van der Vleuten Date: Mon, 23 Jun 2014 11:22:12 +0200 Subject: [PATCH] Don't output stdout and stderr twice when shell provisioner fails [GH-4086] --- plugins/provisioners/shell/provisioner.rb | 6 +++++- templates/locales/en.yml | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/provisioners/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb index 67eca5a16..674c9c5fb 100644 --- a/plugins/provisioners/shell/provisioner.rb +++ b/plugins/provisioners/shell/provisioner.rb @@ -65,7 +65,11 @@ module VagrantPlugins end # Execute it with sudo - comm.execute(command, sudo: config.privileged) do |type, data| + comm.execute( + command, + sudo: config.privileged, + error_key: :ssh_bad_exit_status_muted + ) do |type, data| handle_comm(type, data) end end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 8faf92fe0..f10f64c0e 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -968,6 +968,9 @@ en: Stderr from the command: %{stderr} + ssh_bad_exit_status_muted: |- + The SSH command responded with a non-zero exit status. + Vagrant assumes that this means the command failed! ssh_connect_eacces: |- SSH is getting permission denied errors when attempting to connect to the IP for SSH. This is usually caused by network rules and not being