asdf-nodejs
asdf-nodejs copied to clipboard
Plugin nodejs's list-all callback script failed with output: env: bash\r: No such file or directory
After running asdf list all nodejs I get the following error
Plugin nodejs's list-all callback script failed with output:
env: bash\r: No such file or directory
Any help would be greatly appreciated!
Hi! @Auxtal, some problem here, how did I solve it? Look at the picture what worked for me.

This sounds like a problem with line endings. asdf is written in Bash which expects LF line endings. Sounds like your plugin repos have been cloned with CRLF.
Yes that did work thank you very much, LF lines it is from now on...
Correct me if I am wrong but you can add a .gitattributes file in the repo to prevent this happening in future. (https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/#normalizing-line-endings-in-git-with-gitattributes)
We do this in the core - https://github.com/asdf-vm/asdf/blob/master/.gitattributes
I think we should do this with all our repos. PRs welcome.
Keep in mind there are scenarios where you want something different to the gitattributes automagic text=auto. While it is not recommended to use asdf in WSL on Windows mounted dirs, it is possible one would want to control this specifically per user, see this SO response
Just added .gitattributes to the repo, it is the same one we are using on asdf-core, that should fix it.
But we still should avoid using asdf on Windows dirs, the possibility of incompatibilities can go beyond just line endings