Skip to content

Commit 3bca773

Browse files
Merge pull request #212 from StrangeRanger/renovate/submodules-dotfiles-digest
2 parents ab6ce80 + 00b5cc5 commit 3bca773

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ Entries under the **Removed** section indicate items removed from the entire doc
1010

1111
## Unreleased
1212

13+
## 2025-09-18
14+
15+
### Changed
16+
17+
- changed(alias func): _brew_exec() doesn't output errors when 'brew doctor' is run
18+
1319
## 2025-08-30
1420

1521
### Removed

includes/zshrc-files/zshrc-macos.zsh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ zsh_completion="${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completio
6363
####
6464
# Helper to run a brew subcommand with a nice, consistent, colored log line.
6565
#
66-
# NOTE: This function is written in zsh, rather than bash. I'm not as familiar with zsh
67-
# compared to bash, so this function was written with the help of ChatGPT.
66+
# NOTE: No error will be printed when running `brew doctor`, as it often returns non-zero
67+
# exit codes even when everything is fine.
6868
_brew_exec() {
69-
local subcmd=$1; shift
70-
# Header
71-
print -P -- "%F{blue}%B[INFO]%b%f %F{8}Executing:%f %F{8}$%f %B%F{white}brew%f%b %F{cyan}${subcmd}%f${*:+ ${*}}"
72-
# Run and report
73-
if brew "$subcmd" "$@"; then
69+
local sub_cmd=$1; shift
70+
print -P -- "%F{blue}%B[INFO]%b%f %F{8}Executing:%f %F{8}$%f %B%F{white}brew%f%b %F{cyan}${sub_cmd}%f${*:+ ${*}}"
71+
if brew "$sub_cmd" "$@"; then
7472
print -P -- "%F{green}[OK]%f"
7573
else
76-
local ec=$?
77-
print -P -- "%F{red}[ERROR]%f exit %B${ec}%b"
78-
return $ec
74+
local error_code=$?
75+
if [[ $sub_cmd != "doctor" ]]; then
76+
print -P -- "%F{red}[ERROR]%f exit %B${error_code}%b"
77+
fi
78+
return $error_code
7979
fi
8080
}
8181

submodules/dotfiles

0 commit comments

Comments
 (0)