3737
3838# First order of business, see whether we can setup asdf
3939echo " Looking for asdf install" >&2
40- ASDF_DIR=${ASDF_DIR:- " ${HOME} /.asdf" }
4140
4241# Check if we have the asdf binary for version >= 0.16.0
4342if command -v asdf > /dev/null 2>&1 ; then
@@ -47,6 +46,7 @@ if command -v asdf >/dev/null 2>&1; then
4746 minor=$( echo " $version " | cut -d. -f2)
4847 # If the version is less than 0.16.0 (i.e. major = 0 and minor < 16), use legacy method.
4948 if [ " $major " -eq 0 ] && [ " $minor " -lt 16 ]; then
49+ ASDF_DIR=${ASDF_DIR:- " ${HOME} /.asdf" }
5050 ASDF_SH=" ${ASDF_DIR} /asdf.sh"
5151 if test -f " $ASDF_SH " ; then
5252 >&2 echo " Legacy pre v0.16.0 asdf install found at $ASDF_SH , sourcing"
@@ -56,13 +56,11 @@ if command -v asdf >/dev/null 2>&1; then
5656 >&2 echo " Legacy asdf not found at $ASDF_SH "
5757 fi
5858 else
59- >&2 echo " asdf executable found at $( command -v asdf) . Setting ASDF_DIR=${ASDF_DIR} and adding ${ASDF_DIR} /shims to PATH."
60- # If the binary is found, set up environment for newer asdf versions
61- export ASDF_DATA_DIR=" $ASDF_DIR "
62- export PATH=" $ASDF_DATA_DIR /shims:$PATH "
59+ >&2 echo " asdf executable found at $( command -v asdf) . Using ASDF_DIR=${ASDF_DIR} , ASDF_DATA_DIR=${ASDF_DATA_DIR} ."
6360 fi
6461else
6562 # Fallback to old method for version <= 0.15.x
63+ ASDF_DIR=${ASDF_DIR:- " ${HOME} /.asdf" }
6664 ASDF_SH=" ${ASDF_DIR} /asdf.sh"
6765 if test -f " $ASDF_SH " ; then
6866 >&2 echo " Legacy pre v0.16.0 asdf install found at $ASDF_SH , sourcing"
0 commit comments