Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions home/.chezmoitemplates/homebrew-library
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,18 @@ readonly home_homebrew_prefix="${HOME}/.linuxbrew"
readonly root_homebrew_prefix="/home/linuxbrew/.linuxbrew"

ensure_path_entry "${home_homebrew_prefix}/bin" "${root_homebrew_prefix}/bin"

# https://github.com/Homebrew/brew/issues/17905#issuecomment-3342150232
function faketty() {
local _system
_system="$(uname -s)"
if [[ ${_system} == Darwin ]]; then
script -qF /dev/null "$(printf "%q " "$@")"
else
script -qefc "$(printf "%q " "$@")" /dev/null
fi
}

function brew() {
faketty brew "${@}"
}
3 changes: 3 additions & 0 deletions home/dot_local/bin/executable_full-upgrade.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ true || source ../../.chezmoitemplates/volta-library
ensure_path_entry "${HOME}/.local/bin"

if [[ "${CONTINUE_FROM_DOTFILES:-false}" == false ]]; then
# Request password early if needed
sudo true

if brew --version &>/dev/null; then
(
export HOMEBREW_NO_AUTO_UPDATE=1
Expand Down