From 5470364f895da89dd92391b9a9874c5c330888d9 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Wed, 13 Jan 2021 16:33:11 +0100 Subject: [PATCH] Help can be displayed before root error message --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 4498d30..09c0b74 100755 --- a/install.sh +++ b/install.sh @@ -144,13 +144,13 @@ clean () { } -# Check user -[[ "$(whoami)" == "root" ]] || fatal 1 "You must be root (or use sudo) tu run this script." - trap clean 0 [[ "$FI_INSTALLER_URL" == "" ]] && fatal 5 "can't grab F.I. installer URL, check your connexion\n" "err" process_args "$@" +# Check user +[[ "$(whoami)" == "root" ]] || fatal 1 "You must be root (or use sudo) tu run this script." + debug "Process variables" server="${server:=$default_server}" user="${user:=$default_user}"