mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
fix(asdf): allow plugin to initialize if asdf is installed in ~/.asdf
Previously, the plugin exited early if the `asdf` command was not already in $PATH: (( ! $+commands[asdf] )) && return This broke valid setups where `asdf` is installed manually in ~/.asdf and not yet sourced globally (e.g., via .zshrc). Such installs are still recommended in the official asdf documentation. This change replaces the early exit with a check for the presence of ~/.asdf, so the plugin only runs if the user has a modern asdf setup, while avoiding premature return before `$PATH` and completions are set up. This preserves the new plugin behavior (removal of legacy <0.16 logic), while restoring compatibility for the common manual install path.
This commit is contained in:
parent
750d3ac4b4
commit
4bc1d27ef5
1 changed files with 4 additions and 1 deletions
|
|
@ -1,4 +1,7 @@
|
|||
(( ! $+commands[asdf] )) && return
|
||||
# Only continue if .asdf directory exists (manual install) or fallback logic can apply
|
||||
if [[ ! -d "$HOME/.asdf" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}"
|
||||
path=("$ASDF_DATA_DIR/shims" $path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue