asdf-nodejs icon indicating copy to clipboard operation
asdf-nodejs copied to clipboard

install script assumes path of asdf

Open zrusilla opened this issue 2 years ago • 2 comments

In plugins/nodejs/bin/install, the invocation of asdf reshim assumes that it is findable on the PATH, which may not always be the case.

asdf reshim "$(plugin_name)" "$ASDF_INSTALL_VERSION"

I was able to work around it by modifying ../lib/utils.sh to export ASDF_DIR:

export ASDF_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)

and prepending the path to asdf in install:

$ASDF_DIR/bin/asdf reshim "$(plugin_name)" "$ASDF_INSTALL_VERSION"

I will submit a patch for this if you like.

zrusilla avatar Jul 29 '23 03:07 zrusilla

On which occasions would asdf not be on PATH?

augustobmoura avatar Aug 24 '23 18:08 augustobmoura

On which occasions would asdf not be on PATH?

When installing asdf and nodejs via script, for example.

matmatias avatar Sep 22 '23 17:09 matmatias