Strip new lines from error details

The error details message should just be one string without spacing
so the terminal can set a output length. This will allow messages
from Ruby and Go errors to have similar formating.
This commit is contained in:
sophia 2022-09-14 15:12:32 -04:00
parent b9fb6c5f5f
commit 49280286ad
2 changed files with 2 additions and 1 deletions

View File

@ -525,6 +525,7 @@ func (v *Vagrantfile) TargetConfig(
"provider_not_usable",
map[string]string{"Provider": provider, "Machine": name},
errStatus,
true,
)
}
}

View File

@ -58,7 +58,7 @@ module VagrantPlugins
if err.is_a? Vagrant::Errors::VagrantError
localized_msg_details_any = Google::Protobuf::Any.new
localized_msg_details_any.pack(
Google::Rpc::LocalizedMessage.new(locale: "en-US", message: message)
Google::Rpc::LocalizedMessage.new(locale: "en-US", message: message.gsub("\n", " "))
)
proto = Google::Rpc::Status.new(
code: GRPC::Core::StatusCodes::UNKNOWN,