From b2f69959091b25fdf72deea354d6d3bb5e5bb2bc Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: May 05 2011 15:41:45 +0000 Subject: Update cli_printMessage.sh. --- 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")