New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: regex validate plugin names on plugin add cmd #1010
fix: regex validate plugin names on plugin add cmd #1010
Conversation
Is |
I am not sure of the portability of I think we just wait until someone flags |
@jthegedus sounds good. I didn't realize core was already using |
Summary
Apply regex validation to plugin names when
asdf plugin add
is used.Regex is
^[a-zA-Z0-9_-]+$
and applied viagrep --extended-regexp
.Fixes: #789
Other Information
^[a-zA-Z0-9-]$
was the original discussion. I have added_
as well as the regex will then cover all popular naming conventions (camelCase, snake_case, kebab-case, PascalCase and UPPER_SNAKE).We may restrict this regex further in future because of platform independent handling of filesystem paths with varying cases as discussed in asdf-vm/asdf-plugins#28