Skip to content

Fix plugin-update --all when there are no plugins#805

Merged
Stratus3D merged 2 commits intomasterfrom
joelparkerhenderson-patch-1
Sep 18, 2020
Merged

Fix plugin-update --all when there are no plugins#805
Stratus3D merged 2 commits intomasterfrom
joelparkerhenderson-patch-1

Conversation

@Stratus3D
Copy link
Member

Improved #803

joelparkerhenderson and others added 2 commits September 16, 2020 21:00
Issue: when asdf is first installed, there are no plugins, and running `asdf plugin-update --all` crashes because the plugin directory doesn't exist; similarly, the command crashes if the plugins directory exists yet doesn't contain any subdirectories.

Solution: This patch changes the directory loop from using a wildcard `plugins/*` to a more robust approach: first verify the plugins directory exists, then use the`find` command to list subdirectories and correctly handle the corner case of no subdirectories.

Future: Consider printing an error message and/or advice message. Consider automatically creating the plugins directory as needed. Consider prompting the user to install some popular plugins.
@Stratus3D Stratus3D requested a review from a team as a code owner September 18, 2020 15:53
@Stratus3D Stratus3D merged commit 610bfde into master Sep 18, 2020
@Stratus3D Stratus3D deleted the joelparkerhenderson-patch-1 branch September 18, 2020 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants