asdf-vm / asdf-nodejs

Node.js plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
886 stars 141 forks source link

bug: asdf cannot resolve config paths with whitespace in them #378

Open nix6839 opened 10 months ago

nix6839 commented 10 months ago

From original issue with more context: https://github.com/asdf-vm/asdf-ruby/issues/270

If $ASDF_DATA_DIR is set to a path with whitespace in it, the asdf-nodejs plugin cannot do the business:

$ echo $ASDF_DATA_DIR
/Users/user/Library/Application Support/asdf

$ node
bash: /Users/user/Library/Application: No such file or directory
bash: get_preset_version_for: command not found
No version is set for command node
Consider adding one of the following versions in your config file at
nodejs 18.18.2
boke0 commented 6 months ago

I faced the problem, and I fixed it by modifing ~/.asdf/shims/node. Is it going to be fixed?

augustobmoura commented 6 months ago

I believe this might be a problem for asdf-core itself, the few places we use ASDF_DATA_DIR are all quoted. Can you guys check if updating asdf with asdf update solved the problem?