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
a0f99633
Commit
a0f99633
authored
8 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Disallow running `brew cask` as `root`.
parent
842120cc
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/brew.sh
+0
-3
0 additions, 3 deletions
Library/Homebrew/brew.sh
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+0
-7
0 additions, 7 deletions
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
with
0 additions
and
10 deletions
Library/Homebrew/brew.sh
+
0
−
3
View file @
a0f99633
...
...
@@ -240,9 +240,6 @@ fi
check-run-command-as-root
()
{
[[
"
$(
id
-u
)
"
=
0
]]
||
return
# Homebrew Cask may need `sudo` for system-wide installation.
[[
"
$HOMEBREW_COMMAND
"
=
"cask"
]]
&&
return
# Homebrew Services may need `sudo` for system-wide daemons.
[[
"
$HOMEBREW_COMMAND
"
=
"services"
]]
&&
return
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+
0
−
7
View file @
a0f99633
...
...
@@ -31,7 +31,6 @@ module Hbc
ohai
"Contents of $PATH Environment Variable:"
,
render_env_var
(
"PATH"
)
ohai
"Contents of $SHELL Environment Variable:"
,
render_env_var
(
"SHELL"
)
ohai
"Contents of Locale Environment Variables:"
,
render_with_none
(
locale_variables
)
ohai
"Running As Privileged User:"
,
render_with_none_as_error
(
privileged_uid
)
end
def
self
.
alt_taps
...
...
@@ -107,12 +106,6 @@ module Hbc
ENV
.
keys
.
grep
(
/^(?:LC_\S+|LANG|LANGUAGE)\Z/
).
collect
{
|
v
|
%Q(
#{
v
}
="
#{
ENV
[
v
]
}
")
}.
sort
.
join
(
"
\n
"
)
end
def
self
.
privileged_uid
Process
.
euid
.
zero?
?
"Yes
#{
error_string
"warning: not recommended"
}
"
:
"No"
rescue
StandardError
notfound_string
end
def
self
.
none_string
"<NONE>"
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