Make brew executable for homebrew user only
This commit is contained in:
committed by
T. R. Bernstein
parent
bbc4b80d81
commit
e03ed8c5b8
@@ -65,7 +65,7 @@ function ensureHomebrewOwnershipAndPermission() {
|
|||||||
local username=${homebrew_username}
|
local username=${homebrew_username}
|
||||||
[[ -f ${itemPath} || -d ${itemPath} ]] || return 1
|
[[ -f ${itemPath} || -d ${itemPath} ]] || return 1
|
||||||
chown -R "${username}:admin" ${itemPath}
|
chown -R "${username}:admin" ${itemPath}
|
||||||
chmod ug=rwx,o=rx ${itemPath}
|
chmod u=rwx,go=rx ${itemPath}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensureInstallPrefix() {
|
function ensureInstallPrefix() {
|
||||||
@@ -173,7 +173,7 @@ function createBrewCallerScript() {
|
|||||||
umask 002
|
umask 002
|
||||||
\"${homebrew_prefix}/Homebrew/bin/brew\" \"\$@\"" > ${brewCallerPath}
|
\"${homebrew_prefix}/Homebrew/bin/brew\" \"\$@\"" > ${brewCallerPath}
|
||||||
chown ${username}:admin ${brewCallerPath}
|
chown ${username}:admin ${brewCallerPath}
|
||||||
chmod ug+x,o-x ${brewCallerPath}
|
chmod u+x,go-x ${brewCallerPath}
|
||||||
runAsHomebrewUser ln -sf ${homebrew_prefix}/Homebrew/bin/brew_caller "${homebrew_prefix}/bin/brew"
|
runAsHomebrewUser ln -sf ${homebrew_prefix}/Homebrew/bin/brew_caller "${homebrew_prefix}/bin/brew"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user