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
23fbe234
Commit
23fbe234
authored
11 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Allow specifying a custom PATH for which method
Closes Homebrew/homebrew#21794.
parent
d5325eb4
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/requirements/python_dependency.rb
+3
-9
3 additions, 9 deletions
Library/Homebrew/requirements/python_dependency.rb
Library/Homebrew/utils.rb
+2
-2
2 additions, 2 deletions
Library/Homebrew/utils.rb
with
5 additions
and
11 deletions
Library/Homebrew/requirements/python_dependency.rb
+
3
−
9
View file @
23fbe234
...
...
@@ -121,15 +121,9 @@ class PythonInstalled < Requirement
# Note, we don't support homebrew/versions/pythonXX.rb, though.
Formula
.
factory
(
@name
).
opt_prefix
/
"bin/python
#{
@min_version
.
major
}
"
else
begin
# Using the ORIGINAL_PATHS here because in superenv, the user
# installed external Python is not visible otherwise.
tmp_PATH
=
ENV
[
'PATH'
]
ENV
[
'PATH'
]
=
ORIGINAL_PATHS
.
join
(
':'
)
which
(
@name
)
ensure
ENV
[
'PATH'
]
=
tmp_PATH
end
# Using the ORIGINAL_PATHS here because in superenv, the user
# installed external Python is not visible otherwise.
which
(
@name
,
ORIGINAL_PATHS
.
join
(
':'
))
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/utils.rb
+
2
−
2
View file @
23fbe234
...
...
@@ -166,8 +166,8 @@ def puts_columns items, star_items=[]
end
end
def
which
cmd
dir
=
ENV
[
'PATH'
]
.
split
(
':'
).
find
{
|
p
|
File
.
executable?
File
.
join
(
p
,
cmd
)}
def
which
cmd
,
path
=
ENV
[
'PATH'
]
dir
=
path
.
split
(
':'
).
find
{
|
p
|
File
.
executable?
File
.
join
(
p
,
cmd
)}
Pathname
.
new
(
File
.
join
(
dir
,
cmd
))
unless
dir
.
nil?
end
...
...
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