asdf-vm / asdf

Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
https://asdf-vm.com/
MIT License
21.13k stars 763 forks source link

test: unset ASDF_DATA_DIR and ASDF_CONFIG_FILE during test #1722

Open bootleq opened 4 months ago

bootleq commented 4 months ago

Summary

The purpose of this small change is very similar to 6d8d77f which unset ASDF_DIR.

In user's login shell with asdf, ASDF_DATA_DIR and ASDF_CONFIG_FILE will be set / exported when calling shimmed commands, in test workflow the command is bats.

For quick reproduce, login with ASDF_DIR set to ~/.asdf and having shimmed bats command, then run tests:

will fail due to aforementioned problem.

chrisjpalmer commented 4 months ago

+1 I was just running unit tests... had this exact problem. Great PR