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

bug: lib/utils.sh: line 27: HOME: unbound variable #1896

Open
n-rodriguez opened this issue Feb 6, 2025 · 2 comments
Open

bug: lib/utils.sh: line 27: HOME: unbound variable #1896

n-rodriguez opened this issue Feb 6, 2025 · 2 comments
Labels

Comments

@n-rodriguez
Copy link
Contributor

Describe the Bug

Hi there! I got this error when running asdf plugin update --all or asdf plugin update nodejs :

/Users/nicolas/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 27: HOME: unbound variable
/Users/nicolas/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 27: HOME: unbound variable

From asdf-vm/asdf-nodejs#411 (comment) :

It seems the asdf_data_dir() function in .asdf/plugins/nodejs/lib/utils.sh file isn't reading the environment variables correctly. (eg. ASDF_DATA_DIR, ASDF_DIR, and HOME)

Maybe the latest version of asdf-vm is not passing the environment variables?

Thank you!

Steps to Reproduce

  1. install asdf
  2. install asdf-nodejs plugin
  3. run asdf plugin update --all or asdf plugin update nodejs

Expected Behaviour

It should update plugins without errors

Actual Behaviour

It shows an error :

/Users/nicolas/.asdf/plugins/nodejs/bin/../lib/utils.sh: line 27: HOME: unbound variable

Environment

OS:
Darwin MacBook-Pro-de-Nicolas.local 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 arm64 arm Darwin

SHELL:
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.0.0)
Copyright (C) 2022 Free Software Foundation, Inc.
Licence GPLv3+ : GNU GPL version 3 ou ultérieure <http://gnu.org/licenses/gpl.html>

Ceci est un logiciel libre ; vous être libre de le modifier et de le redistribuer.
AUCUNE GARANTIE n'est fournie, dans les limites permises par la loi.

BASH VERSION:
5.2.37(1)-release

ASDF VERSION:
0.16.1

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/nicolas/.asdf
ASDF_CONFIG_FILE=/Users/nicolas/.asdfrc

ASDF INSTALLED PLUGINS:
...
nodejs     https://github.com/asdf-vm/asdf-nodejs.git             93bd217ba74f05080eebb7d8e1c146a385b01d7f
...

asdf plugins affected (if relevant)

asdf-nodejs

@mainendra
Copy link

Is there any temporary fix for this?

@n-rodriguez
Copy link
Contributor Author

n-rodriguez commented Feb 6, 2025

Is there any temporary fix for this?

Unfortunately no (except #1899)

n-rodriguez added a commit to n-rodriguez/asdf that referenced this issue Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants