Add MACOS_SYSTEM_DEBUG

This commit is contained in:
Rezart Qelibari
2022-04-05 15:27:23 +02:00
parent 449762383d
commit 4296814786
2 changed files with 6 additions and 1 deletions

View File

@@ -81,7 +81,8 @@ function main() {
print 'Will now run the installer.'
local -A colors=() errColors=()
[ -t 1 ] && tput cnorm
sudo --preserve-env=HOMEBREW_BREW_GIT_REMOTE,HOMEBREW_BREW_CORE_GIT_REMOTE "${tmpdir}/install.sh" "$@"
isDebug && export MACOS_SYSTEM_DEBUG=true
sudo --preserve-env=HOMEBREW_BREW_GIT_REMOTE,HOMEBREW_BREW_CORE_GIT_REMOTE,MACOS_SYSTEM_DEBUG "${tmpdir}/install.sh" "$@"
[ -t 1 ] && tput civis
popd -q
}

View File

@@ -7,6 +7,10 @@ function autoloadZShLib() {
autoload -Uz "${funcNames[@]}"
}
function isDebug() {
test "${MACOS_SYSTEM_DEBUG}" = true -o "${MACOS_SYSTEM_DEBUG}" = 1
}
function configureLogging() {
local output=tostdout level=info
[ -n "${logfile}" ] && output=${logfile}