From 8ea7cf60d39dfa51811e1b21eeef17775b15fb78 Mon Sep 17 00:00:00 2001 From: Tjebbe Lievens Date: Fri, 29 Jul 2016 18:35:06 +0200 Subject: [PATCH] Fix is_format_valid 'user' Error is showing but script isn't stopping when entering an invalid user. --- func/main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/func/main.sh b/func/main.sh index 617637b88..de791b806 100644 --- a/func/main.sh +++ b/func/main.sh @@ -465,12 +465,12 @@ sync_cron_jobs() { is_user_format_valid() { if [ ${#1} -eq 1 ]; then if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then - echo "invalid $2 format :: $1" + check_result $E_INVALID "invalid $2 format :: $1" fi else if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]] then - echo "invalid $2 format :: $1" + check_result $E_INVALID "invalid $2 format :: $1" fi fi }