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
fe661a80
Commit
fe661a80
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
extend/ENV/shared: fix Rubocop warnings.
parent
17a7c238
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/extend/ENV/shared.rb
+11
-5
11 additions, 5 deletions
Library/Homebrew/extend/ENV/shared.rb
with
11 additions
and
5 deletions
Library/Homebrew/extend/ENV/shared.rb
+
11
−
5
View file @
fe661a80
...
...
@@ -12,9 +12,9 @@ module SharedEnvExtension
include
CompilerConstants
# @private
CC_FLAG_VARS
=
%w[CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS]
CC_FLAG_VARS
=
%w[CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS]
.
freeze
# @private
FC_FLAG_VARS
=
%w[FCFLAGS FFLAGS]
FC_FLAG_VARS
=
%w[FCFLAGS FFLAGS]
.
freeze
# @private
SANITIZED_VARS
=
%w[
CDPATH GREP_OPTIONS CLICOLOR_FORCE
...
...
@@ -25,7 +25,7 @@ module SharedEnvExtension
CMAKE_PREFIX_PATH CMAKE_INCLUDE_PATH CMAKE_FRAMEWORK_PATH
GOBIN GOPATH GOROOT PERL_MB_OPT PERL_MM_OPT
LIBRARY_PATH
]
]
.
freeze
# @private
def
setup_build_environment
(
formula
=
nil
)
...
...
@@ -193,13 +193,19 @@ module SharedEnvExtension
def
userpaths!
paths
=
self
[
"PATH"
].
split
(
File
::
PATH_SEPARATOR
)
# put Superenv.bin and opt path at the first
new_paths
=
paths
.
select
{
|
p
|
p
.
start_with?
(
"
#{
HOMEBREW_REPOSITORY
}
/Library/ENV"
)
||
p
.
start_with?
(
"
#{
HOMEBREW_PREFIX
}
/opt"
)
}
new_paths
=
paths
.
select
{
|
p
|
p
.
start_with?
(
"
#{
HOMEBREW_REPOSITORY
}
/Library/ENV"
,
"
#{
HOMEBREW_PREFIX
}
/opt"
)
}
# XXX hot fix to prefer brewed stuff (e.g. python) over /usr/bin.
new_paths
<<
"
#{
HOMEBREW_PREFIX
}
/bin"
# reset of self["PATH"]
new_paths
+=
paths
# user paths
new_paths
+=
ORIGINAL_PATHS
.
map
{
|
p
|
p
.
realpath
.
to_s
rescue
nil
}
-
%w[/usr/X11/bin /opt/X11/bin]
new_paths
+=
ORIGINAL_PATHS
.
map
do
|
p
|
begin
p
.
realpath
.
to_s
rescue
nil
end
end
-
%w[/usr/X11/bin /opt/X11/bin]
self
[
"PATH"
]
=
new_paths
.
uniq
.
join
(
File
::
PATH_SEPARATOR
)
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