diff --git a/bin/latest-stable b/bin/latest-stable index e110ca7..2eb67b5 100755 --- a/bin/latest-stable +++ b/bin/latest-stable @@ -7,12 +7,12 @@ # reject release candidates # reject empty line # finally take last one -ASDF_ELIXIR_LATEST_VERSION=$(./list-all | grep -Pv "^0|^main|^master|otp|rc|^$" | tail -n 1) +ASDF_ELIXIR_LATEST_VERSION=$(./list-all | tr " " "\n" | grep -Ev "^0|^main|^master|otp|rc|^$" | tail -n 1) # gets current erlang version without headers # changes spaces to new line # takes second line (Name Version Source Installed) -ASDF_ELIXIR_LATEST_OTP=$(asdf current --no-header erlang | tr -s " " "\n" | sed -n 2p) +ASDF_ELIXIR_LATEST_OTP=$(asdf current --no-header erlang | tr -s " ." "\n" | sed -n 2p) # Note: asdf latest does not allows latest stable version to start with number # therefore installing from source by git ref is not supported, see: