-
Notifications
You must be signed in to change notification settings - Fork 862
chore: Rename BASE_DIR
environment variable to ASDF_DEV_BASE_DIR
#2045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
I did search this project to find code, issues, etc concerning https://github.com/search?q=repo%3Aasdf-vm%2Fasdf%20BASE_DIR&type=code If I missed something obvious, apologies! |
Hi @lukebakken thanks for the PR. This behavior definitely needs to be fixed. With the recent rewrite in Go only the Go tests should be run directly. One of the Go test files should run the BATS tests, and it does set the BASE_DIR environment variable before running them - https://github.com/asdf-vm/asdf/blob/master/cmd/asdf/main_test.go#L127. I think we actually need to update (or remove) |
Yep, I sure missed that 😇 One advantage to being able to run the bats tests outside of go is that it allows running a subset of tests using |
6da34a8
to
2beda74
Compare
BASE_DIR
environment variableBASE_DIR
environment variable to ASDF_DEV_BASE_DIR
New users to `asdf` who wish to contribute will run into the following errors when running `./scripts/test.bash`: ``` ✗ help should show dummy plugin help specific to version when version is present [7] (from function `setup_asdf_dir' in file test/test_helpers.bash, line 16, from function `setup' in test file test/help_command.bats, line 6) `setup_asdf_dir' failed mkdir: cannot create directory ‘/w spacetest_help_should_show_dummy_plugin_help_specific_to_version_when_version_is_present’: Permission denied ``` This is due to paths within the various test suites relying on the `BASE_DIR` environment variable, which is not set by default. This pull request adds the following: * Renames `BASE_DIR` to `ASDF_DEV_BASE_DIR` to clarify intent of the variable. * Modifies `scripts/test.bash` to correctly export `ASDF_DEV_BASE_DIR` Note: I am a long-time asdf user, who would like to contribute to the project and noticed this while setting up my dev environment on an up-to-date Arch Linux system. My intention is to work on this issue: asdf-vm#2042 * Rename `BASE_DIR` to `ASDF_DEV_BASE_DIR` to clarify intent of variable. * Modify `test.bash` to export `ASDF_DEV_BASE_DIR`
2beda74
to
630e5df
Compare
@Stratus3D thanks for your review. Let me know what you think about the latest set of changes. |
@lukebakken looks like you are now just renaming the environment variable. I don't think that's needed. |
I probably should have done two commits - rename, then this: That |
@lukebakken I would like the variable rename reverted as it feels like unnecessary code churn. The other change is good. |
New users to
asdf
who wish to contribute will run into the followingerrors when running
./scripts/test.bash
:This is due to paths within the various test suites relying on the
BASE_DIR
environment variable, which is not set by default.This pull request adds the following:
BASE_DIR
toASDF_DEV_BASE_DIR
to clarify intent of the variable.scripts/test.bash
to correctly exportASDF_DEV_BASE_DIR
Note: I am a long-time asdf user, who would like to contribute to the project and noticed this while setting up my dev environment on an up-to-date Arch Linux system. My intention is to work on this issue:
#2042