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
d8bdcf84
Commit
d8bdcf84
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Remove obsolete guards around canonical_name return value
parent
20f4b317
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/cmd/edit.rb
+1
-5
1 addition, 5 deletions
Library/Homebrew/cmd/edit.rb
Library/Homebrew/cmd/uninstall.rb
+0
-4
0 additions, 4 deletions
Library/Homebrew/cmd/uninstall.rb
Library/Homebrew/extend/ARGV.rb
+2
-9
2 additions, 9 deletions
Library/Homebrew/extend/ARGV.rb
with
3 additions
and
18 deletions
Library/Homebrew/cmd/edit.rb
+
1
−
5
View file @
d8bdcf84
...
...
@@ -27,11 +27,7 @@ module Homebrew extend self
# Don't use ARGV.formulae as that will throw if the file doesn't parse
paths
=
ARGV
.
named
.
map
do
|
name
|
name
=
Formula
.
canonical_name
name
if
name
.
include?
'/'
Pathname
.
new
(
name
)
else
Formula
.
path
(
name
)
end
Formula
.
path
(
name
)
end
unless
ARGV
.
force?
paths
.
each
do
|
path
|
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cmd/uninstall.rb
+
0
−
4
View file @
d8bdcf84
...
...
@@ -18,10 +18,6 @@ module Homebrew extend self
else
ARGV
.
named
.
each
do
|
name
|
name
=
Formula
.
canonical_name
(
name
)
# FIXME canonical_name is insane
raise
"Invalid usage"
if
name
.
include?
'/'
rack
=
HOMEBREW_CELLAR
/
name
if
rack
.
directory?
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/extend/ARGV.rb
+
2
−
9
View file @
d8bdcf84
...
...
@@ -19,16 +19,9 @@ module HomebrewArgvExtension
require
'formula'
@kegs
||=
downcased_unique_named
.
collect
do
|
name
|
canonical_name
=
Formula
.
canonical_name
(
name
)
if
canonical_name
.
include?
"/"
# canonical_name returns a path if it was a formula installed via a
# URL. And we only want the name. FIXME that function is insane.
rack
=
HOMEBREW_CELLAR
/
Pathname
.
new
(
canonical_name
).
stem
else
rack
=
HOMEBREW_CELLAR
/
canonical_name
end
rack
=
HOMEBREW_CELLAR
/
canonical_name
dirs
=
rack
.
directory?
?
rack
.
subdirs
:
[]
raise
NoSuchKegError
.
new
(
rack
.
basename
.
to_s
)
if
not
rack
.
directory?
or
dirs
.
empty?
linked_keg_ref
=
HOMEBREW_REPOSITORY
/
"Library/LinkedKegs"
/
name
...
...
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