Skip to content
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

Invalid variable name #186

Closed
KasMA1990 opened this issue Dec 3, 2020 · 4 comments
Closed

Invalid variable name #186

KasMA1990 opened this issue Dec 3, 2020 · 4 comments

Comments

@KasMA1990
Copy link

I'm using asdf 0.8.0 and have installed the asdf-nodejs plugin and the yarn plugin. When I attempt to run e.g. asdf install, I get this error:

/home/kasper/.asdf/lib/utils.bash: line 234: ASDF_NODE.JS_VERSION: invalid variable name

I'm not sure if it's causing any trouble, since things appear to work.

OS: Ubuntu 20.04
Shell: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

@Stratus3D
Copy link
Member

@KasMA1990 it looks like you may have included a dot in your plugin name. This results in an invalid variable name of ASDF_NODE.JS_VERSION. We should fix this so names with dots are either valid or dots are converted to another character.

@KasMA1990
Copy link
Author

Indeed, I was installing the plugin with this command:

asdf plugin add node.js https://github.com/asdf-vm/asdf-nodejs.git

But using

asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git

instead fixes it.

Another option would be to validate the name, and tell the user not to use dots.

@augustobmoura
Copy link
Member

This is an issue from asdf-core, we should get some warnings going on invalid plugin names

@Stratus3D
Copy link
Member

This has been fixed by asdf-vm/asdf#1010. The . character is no longer permitted in plugin names and an error is printed if you try to use it. So you'll need to use nodejs for the name of this plugin.

Thanks for all your work on the issue tracker @augustobmoura !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants