Skip to content

Commit

Permalink
🐛 fix duplicate path addition
Browse files Browse the repository at this point in the history
  • Loading branch information
ptavares committed Jul 17, 2022
1 parent 4fb12c1 commit e1054a6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zsh-tgenv.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ update_zsh_tgenv() {
}

_zsh_tgenv_load() {
# export PATH
export PATH="$TGENV_HOME/bin:$PATH"
# export PATH if needed
local -r plugin_dir="$TGENV_HOME/bin:$PATH"
# Add the plugin bin directory path if it doesn't exist in $PATH.
if [[ -z ${path[(r)$plugin_dir]} ]]; then
path+=($plugin_dir)
fi
}


Expand Down

0 comments on commit e1054a6

Please sign in to comment.