update: add permissions check
Closes Homebrew/homebrew#42048 Closes Homebrew/homebrew#44434. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
ff132a9ddb
commit
e66cb91702
@ -1,4 +1,5 @@
|
||||
require "cmd/tap"
|
||||
require "cmd/doctor"
|
||||
require "formula_versions"
|
||||
require "migrator"
|
||||
require "formulary"
|
||||
@ -13,6 +14,16 @@ module Homebrew
|
||||
EOS
|
||||
end
|
||||
|
||||
# check permissions
|
||||
checks = Checks.new
|
||||
%w[
|
||||
check_access_usr_local
|
||||
check_access_homebrew_repository
|
||||
].each do |check|
|
||||
out = checks.send(check)
|
||||
odie out unless out.nil?
|
||||
end
|
||||
|
||||
# ensure git is installed
|
||||
Utils.ensure_git_installed!
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user