Description
I somehow got myself into a situation where an installation was listed in ~/.asdf/plugins/erlang/kerl-home/otp-installations
but was not actually installed. I couldn't tell you how I got it that way. Prior to this whole exercise, I hadn't even looked in ~/.asdf
before.
Regardless, when in this situation, kerl
was succeeding to build but failing to install. Since the erlang
plugin suppresses all output, I was seeing this:
KERL_CONFIGURE_OPTIONS="--disable-jit" KERL_BUILD_DOCS=yes asdf install erlang 25.2
asdf_25.2 is not a kerl-managed Erlang/OTP installation
The asdf_25.2 build has been deleted
Extracting source code
Building Erlang/OTP 25.2 (asdf_25.2), please wait...
APPLICATIONS DISABLED (See: /Users/jaysonvantuyl/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_build_25.2.log)
* jinterface : No Java compiler found
* odbc : ODBC library - link check failed
APPLICATIONS INFORMATION (See: /Users/jaysonvantuyl/.asdf/plugins/erlang/kerl-home/builds/asdf_25.2/otp_build_25.2.log)
* wx : Can not link wx program are all developer packages installed?
Building docs...
Erlang/OTP 25.2 (asdf_25.2) has been successfully built
That looks successful, right? However, my prompt tells me when something returns a failure and it was definitely exiting with an error code.
When I commented out the >/dev/null 2>&1
from line 32 of bin/install
(here), I saw that it was failing with the message:
ERROR: Installation (asdf_25.2) already registered for this location (/Users/jaysonvantuyl/.asdf/installs/erlang/25.2)
This was a pretty easy fix once I knew that and found the otp-installations
file. But it was pretty confusing up to this point, since it looks successful.
Is there any way we can either not eat that error or at least display a better error message if it fails?
Here's the output of asdf info
, in case it helps:
OS:
Darwin ip-10-45-66-120.us-west-2.compute.internal 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:43:05 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6020 arm64
SHELL:
zsh 5.9 (arm-apple-darwin22.1.0)
BASH VERSION:
5.2.15(1)-release
ASDF VERSION:
v0.13.1-0586b37
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/jaysonvantuyl/.asdf
ASDF_DIR=/Users/jaysonvantuyl/.asdf
ASDF_CONFIG_FILE=/Users/jaysonvantuyl/.asdfrc
ASDF INSTALLED PLUGINS:
elixir https://github.com/asdf-vm/asdf-elixir.git master a4c42e1
erlang https://github.com/asdf-vm/asdf-erlang.git master 6744df7
golang https://github.com/kennyp/asdf-golang.git master 33b1f6d
terraform https://github.com/asdf-community/asdf-hashicorp.git master 197e3ec