Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
79d4b27c
Commit
79d4b27c
authored
4 years ago
by
Seeker
Browse files
Options
Downloads
Patches
Plain Diff
bump-formula-pr: restore formula if duplicate PR exists
parent
ce16de65
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/dev-cmd/bump-formula-pr.rb
+4
-2
4 additions, 2 deletions
Library/Homebrew/dev-cmd/bump-formula-pr.rb
with
4 additions
and
2 deletions
Library/Homebrew/dev-cmd/bump-formula-pr.rb
+
4
−
2
View file @
79d4b27c
...
...
@@ -316,7 +316,7 @@ module Homebrew
new_formula_version
=
formula_version
(
formula
,
requested_spec
,
new_contents
)
check_for_duplicate_pull_requests
(
formula
,
tap_full_name
,
new_formula_version
.
to_s
)
check_for_duplicate_pull_requests
(
formula
,
backup_file
,
tap_full_name
,
new_formula_version
.
to_s
)
if
!
new_mirrors
&&
!
formula_spec
.
mirrors
.
empty?
if
args
.
force?
...
...
@@ -481,7 +481,7 @@ module Homebrew
[]
end
def
check_for_duplicate_pull_requests
(
formula
,
tap_full_name
,
version
)
def
check_for_duplicate_pull_requests
(
formula
,
backup_file
,
tap_full_name
,
version
)
# check for open requests
pull_requests
=
fetch_pull_requests
(
formula
.
name
,
tap_full_name
,
state:
"open"
)
...
...
@@ -497,8 +497,10 @@ module Homebrew
if
args
.
force?
&&
!
args
.
quiet?
opoo
duplicates_message
elsif
!
args
.
force?
&&
args
.
quiet?
formula
.
path
.
atomic_write
(
backup_file
)
unless
args
.
dry_run?
odie
error_message
elsif
!
args
.
force?
formula
.
path
.
atomic_write
(
backup_file
)
unless
args
.
dry_run?
odie
<<~
EOS
#{
duplicates_message
.
chomp
}
#{
error_message
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment