Skip to content
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

Don't assume that the RUBYLIB environment variable exists #259

Merged

Conversation

jfly
Copy link
Contributor

@jfly jfly commented Mar 27, 2022

When run under asdf-direnv with direnv's strict_env set to true, then
this script will run with bash's nounset enabled, which will cause
this script to crash in the following way:

./exec-env:6: RUBYLIB: unbound variable

(see asdf-community/asdf-direnv#115 for
details)

I know this doesn't affect regular asdf users, but this seems like a
reasonable change to make, I hope you'll accept it!

When run under asdf-direnv with direnv's `strict_env` set to true, then
this script will run with bash's `nounset` enabled, which will cause
this script to crash in the following way:

  ./exec-env:6: RUBYLIB: unbound variable

(see asdf-community/asdf-direnv#115 for
details)

I know this doesn't affect regular asdf users, but this seems like a
reasonable change to make, I hope you'll accept it!
@ohmer
Copy link

ohmer commented Mar 27, 2022

@jfly can reproduce and was about to submit PR for exact same change. Thanks for doing this as well as #115 which I also had waiting!

Copy link

@pboling pboling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Stratus3D
Copy link
Member

Looks good to me as well! Thanks for the PR @jfly !

@Stratus3D Stratus3D merged commit dede2a6 into asdf-vm:master Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants