Pass args correctly in brew pr-pull.
This commit is contained in:
parent
48444d50af
commit
617b369543
@ -129,7 +129,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_branch(path, ref)
|
def check_branch(path, ref, args:)
|
||||||
branch = Utils.popen_read("git", "-C", path, "symbolic-ref", "--short", "HEAD").strip
|
branch = Utils.popen_read("git", "-C", path, "symbolic-ref", "--short", "HEAD").strip
|
||||||
|
|
||||||
return if branch == ref || args.clean? || args.branch_okay?
|
return if branch == ref || args.clean? || args.branch_okay?
|
||||||
@ -154,8 +154,8 @@ module Homebrew
|
|||||||
else
|
else
|
||||||
odebug "Mirroring #{mirror_url}"
|
odebug "Mirroring #{mirror_url}"
|
||||||
mirror_args = ["mirror", f.full_name]
|
mirror_args = ["mirror", f.full_name]
|
||||||
mirror_args << "--debug" if Homebrew.args.debug?
|
mirror_args << "--debug" if args.debug?
|
||||||
mirror_args << "--verbose" if Homebrew.args.verbose?
|
mirror_args << "--verbose" if args.verbose?
|
||||||
mirror_args << "--bintray-org=#{org}" if org
|
mirror_args << "--bintray-org=#{org}" if org
|
||||||
mirror_args << "--bintray-repo=#{repo}" if repo
|
mirror_args << "--bintray-repo=#{repo}" if repo
|
||||||
mirror_args << "--no-publish" unless publish
|
mirror_args << "--no-publish" unless publish
|
||||||
@ -232,7 +232,7 @@ module Homebrew
|
|||||||
_, user, repo, pr = *url_match
|
_, user, repo, pr = *url_match
|
||||||
odie "Not a GitHub pull request: #{arg}" unless pr
|
odie "Not a GitHub pull request: #{arg}" unless pr
|
||||||
|
|
||||||
check_branch tap.path, "master"
|
check_branch tap.path, "master", args: args
|
||||||
|
|
||||||
ohai "Fetching #{tap} pull request ##{pr}"
|
ohai "Fetching #{tap} pull request ##{pr}"
|
||||||
Dir.mktmpdir pr do |dir|
|
Dir.mktmpdir pr do |dir|
|
||||||
@ -258,8 +258,8 @@ module Homebrew
|
|||||||
next if args.no_upload?
|
next if args.no_upload?
|
||||||
|
|
||||||
upload_args = ["pr-upload"]
|
upload_args = ["pr-upload"]
|
||||||
upload_args << "--debug" if Homebrew.args.debug?
|
upload_args << "--debug" if args.debug?
|
||||||
upload_args << "--verbose" if Homebrew.args.verbose?
|
upload_args << "--verbose" if args.verbose?
|
||||||
upload_args << "--no-publish" if args.no_publish?
|
upload_args << "--no-publish" if args.no_publish?
|
||||||
upload_args << "--dry-run" if args.dry_run?
|
upload_args << "--dry-run" if args.dry_run?
|
||||||
upload_args << "--warn-on-upload-failure" if args.warn_on_upload_failure?
|
upload_args << "--warn-on-upload-failure" if args.warn_on_upload_failure?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user