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
5f9140f8
Unverified
Commit
5f9140f8
authored
4 years ago
by
Dawid Dziurla
Browse files
Options
Downloads
Patches
Plain Diff
untap: add --force switch
Co-authored-by:
Eric Knibbe
<
enk3@outlook.com
>
parent
fc0ab4c0
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/untap.rb
+17
-0
17 additions, 0 deletions
Library/Homebrew/cmd/untap.rb
docs/Manpage.md
+3
-0
3 additions, 0 deletions
docs/Manpage.md
manpages/brew.1
+4
-0
4 additions, 0 deletions
manpages/brew.1
with
24 additions
and
0 deletions
Library/Homebrew/cmd/untap.rb
+
17
−
0
View file @
5f9140f8
...
...
@@ -2,6 +2,7 @@
# frozen_string_literal: true
require
"cli/parser"
require
"formula"
module
Homebrew
extend
T
::
Sig
...
...
@@ -16,6 +17,8 @@ module Homebrew
Remove a tapped formula repository.
EOS
switch
"-f"
,
"--force"
,
description:
"Untap even if formulae or casks from this tap are currently installed."
min_named
1
end
...
...
@@ -28,6 +31,20 @@ module Homebrew
tap
=
Tap
.
fetch
(
tapname
)
odie
"Untapping
#{
tap
}
is not allowed"
if
tap
.
core_tap?
installed_tap_formulae
=
Formula
.
installed
.
select
{
|
formula
|
formula
.
tap
==
tap
}
installed_tap_casks
=
Cask
::
Caskroom
.
casks
.
select
{
|
cask
|
cask
.
tap
==
tap
}
if
installed_tap_formulae
.
length
.
positive?
||
installed_tap_casks
.
length
.
positive?
if
args
.
force?
opoo
"Untapping
#{
tap
}
even though it contains formulae or casks that are currently installed."
else
odie
<<~
EOS
Refusing to untap
#{
tap
}
because it contains the following installed formulae or casks:
#{
(
installed_tap_formulae
+
installed_tap_casks
.
map
(
&
:token
)).
join
(
"
\n
"
)
}
EOS
end
end
tap
.
uninstall
end
end
...
...
This diff is collapsed.
Click to expand it.
docs/Manpage.md
+
3
−
0
View file @
5f9140f8
...
...
@@ -572,6 +572,9 @@ See also `pin`.
Remove a tapped formula repository.
*
`-f`
,
`--force`
:
Untap even if formulae or casks from this tap are currently installed.
### `update` [*`options`*]
Fetch the newest version of Homebrew and all formulae from GitHub using
`git`
(1) and perform any necessary migrations.
...
...
This diff is collapsed.
Click to expand it.
manpages/brew.1
+
4
−
0
View file @
5f9140f8
...
...
@@ -770,6 +770,10 @@ Unpin \fIformula\fR, allowing them to be upgraded by \fBbrew upgrade\fR \fIformu
.SS "\fBuntap\fR \fItap\fR"
Remove a tapped formula repository\.
.
.TP
\fB\-f\fR, \fB\-\-force\fR
Untap even if formulae or casks from this tap are currently installed\.
.
.SS "\fBupdate\fR [\fIoptions\fR]"
Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\fR(1) and perform any necessary migrations\.
.
...
...
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