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
43c6061b
Commit
43c6061b
authored
9 years ago
by
Xu Cheng
Browse files
Options
Downloads
Patches
Plain Diff
Tap#install: support quiet option
parent
bbe4191c
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/tap.rb
+7
-3
7 additions, 3 deletions
Library/Homebrew/tap.rb
with
7 additions
and
3 deletions
Library/Homebrew/tap.rb
+
7
−
3
View file @
43c6061b
...
...
@@ -140,17 +140,21 @@ class Tap
# @param [Hash] options
# @option options [String] :clone_targe If passed, it will be used as the clone remote.
# @option options [Boolean] :full_clone If set as true, full clone will be used.
# @option options [Boolean] :quiet If set, suppress all output.
def
install
(
options
=
{})
require
"descriptions"
raise
TapAlreadyTappedError
,
name
if
installed?
clear_cache
quiet
=
options
.
fetch
(
:quiet
,
false
)
# ensure git is installed
Utils
.
ensure_git_installed!
ohai
"Tapping
#{
name
}
"
ohai
"Tapping
#{
name
}
"
unless
quiet
remote
=
options
[
:clone_target
]
||
"https://github.com/
#{
user
}
/homebrew-
#{
repo
}
"
args
=
%W[clone
#{
remote
}
#{
path
}
]
args
<<
"--depth=1"
unless
options
.
fetch
(
:full_clone
,
false
)
args
<<
"-q"
if
quiet
begin
safe_system
"git"
,
*
args
...
...
@@ -165,10 +169,10 @@ class Tap
link_manpages
formula_count
=
formula_files
.
size
puts
"Tapped
#{
formula_count
}
formula
#{
plural
(
formula_count
,
"e"
)
}
(
#{
path
.
abv
}
)"
puts
"Tapped
#{
formula_count
}
formula
#{
plural
(
formula_count
,
"e"
)
}
(
#{
path
.
abv
}
)"
unless
quiet
Descriptions
.
cache_formulae
(
formula_names
)
if
!
options
[
:clone_target
]
&&
private
?
if
!
options
[
:clone_target
]
&&
private
?
&&
!
quiet
puts
<<-
EOS
.
undent
It looks like you tapped a private repository. To avoid entering your
credentials each time you update, you can use git HTTP credential
...
...
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