diff --git a/easyrsa3/easyrsa b/easyrsa3/easyrsa index 2e5d13b..6a50152 100755 --- a/easyrsa3/easyrsa +++ b/easyrsa3/easyrsa @@ -262,7 +262,7 @@ Deprecated features: # Wrapper around printf - clobber print since it's not POSIX anyway # shellcheck disable=SC1117 -print() { printf "%s\n" "$*"; } +print() { printf "%s\n" "$*" || exit 1; } # Exit fatally with a message to stderr # present even with EASYRSA_BATCH as these are fatal problems @@ -279,6 +279,8 @@ warn() { [ ! "$EASYRSA_BATCH" ] && \ print " $1" 1>&2 + + return 0 } # => warn() # informational notices to stdout @@ -286,6 +288,8 @@ notice() { [ ! "$EASYRSA_BATCH" ] && \ print " $1" + + return 0 } # => notice() # yes/no case-insensitive match (operates on stdin pipe)