diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
index 7ac703fc5f16e82a6f162f53c7558f217e69f693..ed644e28d0e3ccccbbf8313da5eb856368585f9d 100644
--- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb
+++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb
@@ -388,10 +388,10 @@ module Homebrew
   else
     # GitHub API responds immediately but fork takes a few seconds to be ready.
     sleep 1 until GitHub.check_fork_exists(tap_full_name)
-    if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
-      remote_url = response.fetch("ssh_url")
+    remote_url =  if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
+      response.fetch("ssh_url")
     else
-      remote_url = response.fetch("clone_url")
+      response.fetch("clone_url")
     end
     username = response.fetch("owner").fetch("login")
     [remote_url, username]