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

os_based_configure_options cannot bail early #37

Closed
akerl opened this issue May 8, 2017 · 3 comments
Closed

os_based_configure_options cannot bail early #37

akerl opened this issue May 8, 2017 · 3 comments

Comments

@akerl
Copy link

akerl commented May 8, 2017

I ran into an issue w/ os_based_configure_options: Because it is called in a subshell (

local configure_options="$(os_based_configure_options) --prefix=$install_path"
), if it exits, that error gets swallowed up.

This occurs if homebrew isn't available on

exit_if_homebrew_not_installed
.

So in my case, it can't find homebrew, that check exits 1, but that gets absorbed by the subshell and the build attempts to continue. It fails, but as a similar issue, we "exit 1" from the subshell on

asdf-ruby/bin/install

Lines 46 to 49 in 302efde

./configure $configure_options || exit 1
make || exit 1
make install || exit 1
)
, so those exit codes are swallowed.

The end result is that I run an install, the exit code is 0, but no installation has occurred. This appears to be replicated exactly or similar across at least asdf-python and asdf-erlang

@akerl
Copy link
Author

akerl commented May 8, 2017

On a related note, I'm curious about the utility of ASDF_PKG_MISSING. It's set inside os_based_configure_options, but doesn't bubble up since it's using a subshell, so it'll always be empty everywhere it's used.

@Stratus3D
Copy link
Member

For the asdf-erlang plugin we are moving away from strictly requiring homebrew to be installed to just asserting that the dependencies are present. That's another thing that should probably be changed here too.

@iloveitaly
Copy link

This code does not exist in this plugin anymore, I think this issue is safe to close out.

For anyone else who lands on this page via google, code setting ASDF_PKG_MISSING in various asdf packages looks like it was copy/pasted from a plugin way back. The variable is not used by the core asdf package and does nothing when set unless there's conditional logic to check for it within the asdf plugin script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants