diff --git a/ssm b/ssm index e9dbee2..3b0847b 100755 --- a/ssm +++ b/ssm @@ -2,7 +2,7 @@ shopt -s nullglob # Utility functions -is_function() [[ $(type -t $1 2>/dev/null) == 'function' ]] +is_function() [[ "$(type -t "$1" 2>/dev/null)" == 'function' ]] readonly -f is_function usage() { @@ -128,7 +128,7 @@ if_service_action() { is_function "$f" && return 0 done - return 0 + return 1 }; readonly -f if_service_action run_service_action() {