diff --git a/Scripts/Functions/cli_printMessage.sh b/Scripts/Functions/cli_printMessage.sh index 0bc682d..244246e 100755 --- a/Scripts/Functions/cli_printMessage.sh +++ b/Scripts/Functions/cli_printMessage.sh @@ -59,6 +59,11 @@ function cli_printMessage { # Initialize message variable locally using non-option arguments. local MESSAGE=$(echo $@ | sed -r 's!^(.*[[:space:]]*--[[:space:]]+)?!!') + # Verify message variable, it cannot have an empty value. + if [[ $MESSAGE == '' ]];then + cli_printMessage "`gettext "The message cannot be empty."`" --as-error-line + fi + # Reverse character codification performed when the list of # arguments wast built at cli_doParseArgumentsReDef.sh. MESSAGE=$(echo $MESSAGE | sed "s/\\\0x27/'/g")