mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-26 21:51:05 +01:00
perf(yarn): skip yarn
call if default global bin directory exists (#10290)
Fixes #10290
This commit is contained in:
parent
c155531402
commit
4ef188cebf
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
||||||
# Add yarn bin directory to $PATH if it exists and not in $PATH already
|
# Skip yarn call if default global bin dir exists
|
||||||
bindir=$(yarn global bin 2>/dev/null) \
|
[[ -d "$HOME/.yarn/bin" ]] && bindir="$HOME/.yarn/bin" || bindir="$(yarn global bin 2>/dev/null)"
|
||||||
|
|
||||||
|
# Add yarn bin directory to $PATH if it exists and not already in $PATH
|
||||||
|
[[ $? -eq 0 ]] \
|
||||||
&& [[ -d "$bindir" ]] \
|
&& [[ -d "$bindir" ]] \
|
||||||
&& (( ! ${path[(Ie)$bindir]} )) \
|
&& (( ! ${path[(Ie)$bindir]} )) \
|
||||||
&& path+=("$bindir")
|
&& path+=("$bindir")
|
||||||
|
|
Loading…
Reference in a new issue