Use which instead of type so that bash doesnt report error to GUI

This commit is contained in:
2025-05-06 22:47:43 +08:00
parent bd9bc865ab
commit 63b2ea7388

View File

@@ -101,7 +101,9 @@ export PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"
# aliases
alias less='less -i -r'
type winget.exe >/dev/null && alias winget="$(which winget.exe)"
if which winget.exe >/dev/null 2>&1; then
alias winget="$(which winget.exe)"
fi
# profile variables that need to be defined late
[ -f "$HOME/.profile-post-local" ] && source "$HOME/.profile-post-local"