mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 01:28:17 -07:00
Avoid looking at other plugin shims when reshiming
This commit is contained in:
parent
8a2fd85529
commit
4d146ea652
@ -184,11 +184,12 @@ remove_obsolete_shims() {
|
|||||||
local install_path
|
local install_path
|
||||||
install_path=$(get_install_path "$plugin_name" "$install_type" "$version")
|
install_path=$(get_install_path "$plugin_name" "$install_type" "$version")
|
||||||
|
|
||||||
for shim_path in "$shims_path"/*; do
|
local target_shims
|
||||||
|
target_shims=($(grep -lr "# asdf-plugin: $plugin_name" $shims_path))
|
||||||
|
for shim_path in "${target_shims[@]}"; do
|
||||||
local shim_name
|
local shim_name
|
||||||
shim_name="$(basename "$shim_path")"
|
shim_name="$(basename "$shim_path")"
|
||||||
if grep "# asdf-plugin: $plugin_name" "$shim_path" > /dev/null && \
|
if grep "# asdf-plugin-version: $version" "$shim_path" > /dev/null && \
|
||||||
grep "# asdf-plugin-version: $version" "$shim_path" > /dev/null && \
|
|
||||||
! shim_still_exists "$shim_name" "$install_path" "$space_separated_list_of_bin_paths"; then
|
! shim_still_exists "$shim_name" "$install_path" "$space_separated_list_of_bin_paths"; then
|
||||||
remove_shim_for_version "$plugin_name" "$shim_name" "$version"
|
remove_shim_for_version "$plugin_name" "$shim_name" "$version"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user