asdf: Git submodule fails with asdf error

Steps to reproduce


XD: git submodule add https://github.com/jeff-hykin/beatle_interface 
/usr/local/opt/asdf/lib/utils.sh: line 208: ASDF_GETTEXT.SH_VERSION: invalid variable name
asdf: No version set for command gettext.sh
you might want to add one of the following in your .tool-versions file:

python anaconda3-5.3.1

Expected behavior

Creating a git submodule should have nothing to do with asdf

Actual behavior

There’s an asdf error and I’m unable to add git submodules

Environment

OS: MacOS Sierra 10.12.6

zsh version: 5.8 (x86_64-apple-darwin16.7.0)

asdf version: v0.7.6

Notes

why is asdf affecting git?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

I will close this issue soon because I don’t think there is anything we can do to fix this in asdf core. This seems to be caused by a subset of plugins, python being the primary one. Unless someone identifies something in asdf core that is contributing to this project I suggest opening this same issue with maintainers of plugins that cause this issue.

This problem appeared after installing anaconda3-2020.11 with asdf.
This is where problem is https://github.com/danhper/asdf-python/issues/44
I also have gettext installed with homebrew and asdf shimed gettext breaks git for me. And look like I have similar problem with conflicting sqlite3.

Same here, python anaconda3-2020.02 (not sure if other anaconda versions are affected, I’ve only installed that one) led to so many issues (like curl stop working as which curl led to asdf shims but there was no curl inside…)

asdf uninstall python anaconda3-2020.02 solved all of the issues I had

No idea. Perhaps you have a git hook that is invoking an asdf shim?

I am certain that asdf itself is not meddling with Git. Git or another tool on your system is invoking an asdf shim.

Hmm that is really strange then. I don’t have a .tool-versions file, there is no python in the entire file directory/repo that I’m in.

I found somewhat of a source of an issue. Reinstalling asdf with only python 3.8.2 lets the submodule work, however it begins failing again when I restore the old ~/.asdf. After some debugging, I found that renaming ~/.asdf/shims/gettext.sh to ~/.asdf/shims/gettext1.sh for some reason prevents the error.

If asdf isn’t hooking into git, then would it be something from python (probably anaconda) that is?

Upon reinstall it appears /usr/local/opt/asdf/lib/utils.sh doesn’t exist anymore, so the error message is this (note the restored ~/.asdf didn’t contain python 3.8.2):

asdf: No preset version installed for command gettext.sh
Please install the missing version by running one of the following:

asdf install python 3.8.2

or add one of the following in your .tool-versions file:

python anaconda3-5.3.1