This small gist contains to fake asdf-plugins to help me ensure installation order and if tools get activated at installation time for subsequent tools, that is, given the following .tool-versions file:
a foo
b bar
asdf install
should first install a
with version foo
and then install
b
with version bar
which actually uses a
to create the b
executable.
# install these two fake plugins
mkdir -p ~/.asdf/plugins/a/bin ~/.asdf/plugins/b/bin
cp a_install ~/.asdf/plugins/a/bin/install
cp b_install ~/.asdf/plugins/b/bin/install
chmod 755 ~/.asdf/plugins/{a,b}/bin/install
# request foo and bar versions of a and b
mkdir /tmp/project-x
cd /tmp/project-x
cat <<EOF > .tool-versions
a foo
b bar
EOF
asdf install
b # should print that it was installed by a-foo
# request baz and bat versions of a and b
mkdir /tmp/project-y
cd /tmp/project-y
cat <<EOF >.tool-versions
a baz
b bat
EOF
asdf install
b # should print that it was installed by a-baz
# cleanup
asdf uninstall a
asdf uninstall b
rm -rf ~/.asdf/plugins/a ~/.asdf/plugins/b