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
e117a68f
Commit
e117a68f
authored
4 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Force `brew upgrade` to treat arguments as casks if `--cask` is passed.
parent
c9e2a06f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/cli/named_args.rb
+2
-2
2 additions, 2 deletions
Library/Homebrew/cli/named_args.rb
Library/Homebrew/cmd/upgrade.rb
+4
-1
4 additions, 1 deletion
Library/Homebrew/cmd/upgrade.rb
with
6 additions
and
3 deletions
Library/Homebrew/cli/named_args.rb
+
2
−
2
View file @
e117a68f
...
...
@@ -79,8 +79,8 @@ module Homebrew
.
freeze
end
def
to_resolved_formulae_to_casks
@to_resolved_formulae_to_casks
||=
to_formulae_and_casks
(
method: :resolve
)
def
to_resolved_formulae_to_casks
(
only:
nil
)
@to_resolved_formulae_to_casks
||=
to_formulae_and_casks
(
method: :resolve
,
only:
only
)
.
partition
{
|
o
|
o
.
is_a?
(
Formula
)
}
.
map
(
&
:freeze
).
freeze
end
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cmd/upgrade.rb
+
4
−
1
View file @
e117a68f
...
...
@@ -91,7 +91,10 @@ module Homebrew
def
upgrade
args
=
upgrade_args
.
parse
formulae
,
casks
=
args
.
named
.
to_resolved_formulae_to_casks
only
=
:formula
if
args
.
formula?
&&
!
args
.
cask?
only
=
:cask
if
args
.
cask?
&&
!
args
.
formula?
formulae
,
casks
=
args
.
named
.
to_resolved_formulae_to_casks
(
only:
only
)
# If one or more formulae are specified, but no casks were
# specified, we want to make note of that so we don't
# try to upgrade all outdated casks.
...
...
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