mirror of
https://github.com/asdf-vm/asdf.git
synced 2024-11-15 09:38:16 -07:00
Merge pull request #805 from asdf-vm/joelparkerhenderson-patch-1
Fix plugin-update --all when there are no plugins
This commit is contained in:
commit
610bfde586
@ -9,10 +9,12 @@ plugin_update_command() {
|
|||||||
local plugin_name="$1"
|
local plugin_name="$1"
|
||||||
local gitref="${2:-master}"
|
local gitref="${2:-master}"
|
||||||
if [ "$plugin_name" = "--all" ]; then
|
if [ "$plugin_name" = "--all" ]; then
|
||||||
for dir in "$(asdf_data_dir)"/plugins/*; do
|
if [ -d "$(asdf_data_dir)"/plugins ]; then
|
||||||
echo "Updating $(basename "$dir")..."
|
while IFS= read -r -d '' dir; do
|
||||||
(cd "$dir" && git fetch -p -u origin "$gitref:$gitref" && git checkout -f "$gitref")
|
echo "Updating $(basename "$dir")..."
|
||||||
done
|
(cd "$dir" && git fetch -p -u origin "$gitref:$gitref" && git checkout -f "$gitref")
|
||||||
|
done < <(find "$(asdf_data_dir)"/plugins -type d -mindepth 1 -maxdepth 1)
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
local plugin_path
|
local plugin_path
|
||||||
plugin_path="$(get_plugin_path "$plugin_name")"
|
plugin_path="$(get_plugin_path "$plugin_name")"
|
||||||
|
Loading…
Reference in New Issue
Block a user