Skip to content

Commit

Permalink
fix(fish): ASDF_DEFAULT_TOOL_VERSIONS_FILENAME workaround no longer
Browse files Browse the repository at this point in the history
  • Loading branch information
petertriho committed Jun 10, 2022
1 parent 9ddf48e commit ee754d1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions scripts/.local/bin/xfish
Expand Up @@ -4,18 +4,10 @@ set -euo pipefail

cmd="arch -x86_64 \\
-e ASDF_DATA_DIR=\"$HOME/.asdf_x86\" \\
-e ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=\"$HOME/.tool-versions-x86\" \\
-e ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=\".tool-versions-x86\" \\
-e ASDF_NPM_DEFAULT_PACKAGES_FILE=\"$HOME/.default-npm-packages-x86\" \\
-e ASDF_PYTHON_DEFAULT_PACKAGES_FILE=\"$HOME/.default-python-packages-x86\" \\
-e DOCKER_DEFAULT_PLATFORM=linux/amd64 \\
"

if [[ -n $(asdf current nodejs 2>&1 | grep "$HOME/.tool-versions") ]]; then
cmd+=" -e ASDF_NODEJS_VERSION=$(grep "nodejs" "$HOME/.tool-versions-x86" | sed "s/nodejs *\(.*\)/\1/")"
fi

if [[ -n $(asdf current python 2>&1 | grep "$HOME/.tool-versions") ]]; then
cmd+=" -e ASDF_PYTHON_VERSION=$(grep "python" "$HOME/.tool-versions-x86" | sed "s/python *\(.*\)/\1/")"
fi

eval "$cmd /usr/local/bin/fish $*"

0 comments on commit ee754d1

Please sign in to comment.