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
c88d587b
Unverified
Commit
c88d587b
authored
4 years ago
by
Mike McQuaid
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #7508 from MikeMcQuaid/pkgetc
formula: add pkgetc method.
parents
be5bbcd7
8e318d81
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/formula.rb
+10
-2
10 additions, 2 deletions
Library/Homebrew/formula.rb
with
10 additions
and
2 deletions
Library/Homebrew/formula.rb
+
10
−
2
View file @
c88d587b
...
...
@@ -790,6 +790,14 @@ class Formula
(
HOMEBREW_PREFIX
/
"etc"
).
extend
(
InstallRenamed
)
end
# A subdirectory of `etc` with the formula name suffixed.
# e.g. `$HOMEBREW_PREFIX/etc/openssl@1.1`
# Anything using `pkgetc.install` will not overwrite other files on
# e.g. upgrades but will write a new file named `*.default`.
def
pkgetc
(
HOMEBREW_PREFIX
/
"etc"
/
name
).
extend
(
InstallRenamed
)
end
# The directory where the formula's variable files should be installed.
# This directory is not inside the `HOMEBREW_CELLAR` so it persists
# across upgrades.
...
...
@@ -1080,7 +1088,7 @@ class Formula
# keg's formula is deleted.
begin
keg
=
Keg
.
for
(
path
)
rescue
NotAKegError
,
Errno
::
ENOENT
# rubocop:disable Lint/SuppressedException
rescue
NotAKegError
,
Errno
::
ENOENT
# file doesn't belong to any keg.
else
tab_tap
=
Tab
.
for_keg
(
keg
).
tap
...
...
@@ -1089,7 +1097,7 @@ class Formula
begin
Formulary
.
factory
(
keg
.
name
)
rescue
FormulaUnavailableError
# rubocop:disable Lint/SuppressedException
rescue
FormulaUnavailableError
# formula for this keg is deleted, so defer to whitelist
rescue
TapFormulaAmbiguityError
,
TapFormulaWithOldnameAmbiguityError
return
false
# this keg belongs to another formula
...
...
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