refactor: unify command declaration across codebase
This commit is contained in:
@@ -6,9 +6,11 @@ source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
|
||||
cmd-nginx-validate() {
|
||||
declare desc="validates and optionally cleans up invalid nginx configurations"
|
||||
declare cmd="nginx:validate" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
validate_nginx "$@"
|
||||
declare cmd="nginx:validate"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" FLAG="$2"
|
||||
|
||||
validate_nginx "$APP" "$FLAG"
|
||||
}
|
||||
|
||||
cmd-nginx-validate "$@"
|
||||
|
||||
Reference in New Issue
Block a user