From b29ec8cf658e0bcf9826e8ed75caa510f73a577a Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Mon, 21 Jun 2021 13:37:49 -0500 Subject: [PATCH] utils/github.rb: fix dry-run message --- Library/Homebrew/utils/github.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index c41d238f1..f7e038b45 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -482,10 +482,13 @@ module GitHub changed_files += additional_files if additional_files.present? if args.dry_run? || (args.write? && !args.commit?) - unless args.no_fork? + if args.no_fork? + remote_url = Utils.popen_read("git", "remote", "get-url", "--push", "origin").chomp + else fork_message = "try to fork repository with GitHub API" \ "#{" into `#{args.fork_org}` organization" if args.fork_org}" ohai fork_message + remote_url = "FORK_URL" end ohai "git fetch --unshallow origin" if shallow ohai "git add #{changed_files.join(" ")}"