Skip to content

Commit 8ea7cf6

Browse files
authored
Fix is_format_valid 'user'
Error is showing but script isn't stopping when entering an invalid user.
1 parent e6d6e19 commit 8ea7cf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,12 @@ sync_cron_jobs() {
465465
is_user_format_valid() {
466466
if [ ${#1} -eq 1 ]; then
467467
if ! [[ "$1" =~ ^^[[:alnum:]]$ ]]; then
468-
echo "invalid $2 format :: $1"
468+
check_result $E_INVALID "invalid $2 format :: $1"
469469
fi
470470
else
471471
if ! [[ "$1" =~ ^[[:alnum:]][-|\.|_[:alnum:]]{0,28}[[:alnum:]]$ ]]
472472
then
473-
echo "invalid $2 format :: $1"
473+
check_result $E_INVALID "invalid $2 format :: $1"
474474
fi
475475
fi
476476
}

0 commit comments

Comments
 (0)