diff --git a/spec/utility/parse-args_spec.sh b/spec/utility/parse-args_spec.sh index 4f5f4408..406954d1 100644 --- a/spec/utility/parse-args_spec.sh +++ b/spec/utility/parse-args_spec.sh @@ -122,7 +122,7 @@ Describe 'parse-arg.sh' ) When run parseArguments params 'example' 'v1.0.0' -v v0.1.0 The status should be failure - The stderr should include "$(printf "you need to define the variable \033[0;36masdf\033[0m")" + The stderr should include "$(printf "you need to \`declare\` (\`local\`) the variable \033[0;36masdf\033[0m")" End End End diff --git a/src/utility/checks.sh b/src/utility/checks.sh index 1e150107..2e491f78 100644 --- a/src/utility/checks.sh +++ b/src/utility/checks.sh @@ -304,7 +304,7 @@ function exitIfVariablesNotDeclared() { shift 1 || traceAndDie "could not shift by 1" for variableName in "$@"; do if ! declare -p "$variableName" 2>/dev/null | grep -q 'declare --'; then - logError "you need to define the variable \033[0;36m%s\033[0m otherwise we write to the global scope" "$variableName" + logError "you need to \`declare\` (\`local\`) the variable \033[0;36m%s\033[0m otherwise we write to the global scope (you can also \`declare\` it in the global scope)" "$variableName" printStackTrace exit 1 fi