Merge pull request #12646 from hashicorp/push-heroku-print-output

Print output when pushing to Heroku
This commit is contained in:
Paul Hinze 2022-07-28 16:36:55 -05:00 committed by GitHub
commit 4c34c9d26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,14 @@ module VagrantPlugins
# Execute the command, raising an exception if it fails.
# @return [Vagrant::Util::Subprocess::Result]
def execute!(*cmd)
result = Vagrant::Util::Subprocess.execute(*cmd)
subproccmd = cmd.dup << { notify: [:stdout, :stderr] }
result = Vagrant::Util::Subprocess.execute(*subproccmd) do |type, data|
if type == :stdout
@env.ui.info(data, new_line: false)
elsif type == :stderr
@env.ui.warn(data, new_line: false)
end
end
if result.exit_code != 0
raise Errors::CommandFailed,