diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index c1c64b8908..c64f7cdbfc 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -5,12 +5,16 @@ require "uri" require "utils/github/actions" require "utils/github/api" +require "system_command" + # Wrapper functions for the GitHub API. # # @api private module GitHub extend T::Sig + include SystemCommand::Mixin + module_function def check_runs(repo: nil, commit: nil, pr: nil) @@ -530,7 +534,8 @@ module GitHub "--", *changed_files return if args.commit? - safe_system "git", "push", "--set-upstream", remote_url, "#{branch}:#{branch}" + system_command!("git", args: ["push", "--set-upstream", remote_url, "#{branch}:#{branch}"], + print_stdout: true) safe_system "git", "checkout", "--quiet", previous_branch pr_message = <<~EOS #{pr_message}