From c39a0a4a0fa836e748afc471d052b9736fcd6b99 Mon Sep 17 00:00:00 2001 From: Mazen Harake Date: Tue, 19 Jul 2016 12:07:34 +0200 Subject: Fix Issue #22 Exit script if $HOME variable is empty or not set. --- kerl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kerl b/kerl index e5f6c76..70b5d7b 100755 --- a/kerl +++ b/kerl @@ -29,6 +29,11 @@ GREP_OPTIONS='' ERLANG_DOWNLOAD_URL="http://www.erlang.org/download" +if [ -z "$HOME" ]; then + echo "Error: \$HOME is empty or not set." 1>&2 + exit 1 +fi + # Default values : ${OTP_GITHUB_URL:="https://github.com/erlang/otp"} : ${KERL_BASE_DIR:="$HOME"/.kerl} -- cgit v1.2.3