From e967fffdfb75667b7a7b35809765b5195d4f07e5 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Tue, 22 Jun 2021 09:16:08 -0500 Subject: [PATCH] Apply Mike's suggestions Co-authored-by: Mike McQuaid --- Library/Homebrew/utils/github.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index f7e038b454..80423cb4ff 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -482,13 +482,13 @@ module GitHub changed_files += additional_files if additional_files.present? if args.dry_run? || (args.write? && !args.commit?) - if args.no_fork? - remote_url = Utils.popen_read("git", "remote", "get-url", "--push", "origin").chomp + remote_url = if args.no_fork? + 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" + "FORK_URL" end ohai "git fetch --unshallow origin" if shallow ohai "git add #{changed_files.join(" ")}"