Skip to content

Commit 02e0042

Browse files
authored
fix: ignore extraneous Erlang output during when CLI installation (#487)
1 parent d8f8a35 commit 02e0042

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

install-self-hosted-toolbox

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ fi
7575

7676

7777
echo "Installing the when CLI"
78-
ERLANG_VERSION=$(erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tr -d '"\r')
78+
ERLANG_VERSION=$(erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tail -n1 | tr -d '"\r')
79+
echo "Erlang version: $ERLANG_VERSION"
7980
install_cmd mv ~/.toolbox/when_otp_$ERLANG_VERSION $INSTALL_PATH/when
8081
install_cmd chmod +x $INSTALL_PATH/when
8182
if [[ $? -eq 0 ]];then

install-toolbox

+2-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ if [[ `uname` != "Darwin" ]]; then
140140
fi
141141

142142
echo "Installing the when CLI"
143-
ERLANG_VERSION=$(erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tr -d '"\r')
143+
ERLANG_VERSION=$(erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tail -n1 | tr -d '"\r')
144+
echo "Erlang version: $ERLANG_VERSION"
144145
install_cmd mv ~/.toolbox/when_otp_$ERLANG_VERSION $INSTALL_PATH/when
145146
install_cmd chmod +x $INSTALL_PATH/when
146147
if [[ $? -eq 0 ]];then

0 commit comments

Comments
 (0)