lint: remove unnecessary negation

Also use double-brackets where possible.

Fixes SC2236
This commit is contained in:
Jose Diaz-Gonzalez
2019-02-02 13:52:18 -05:00
parent 67ae374e60
commit c7b71b5d92
9 changed files with 15 additions and 15 deletions

View File

@@ -45,7 +45,7 @@ hello_main_cmd() {
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
local argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
[[ ! -z $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
set -- $cmd $@
##
@@ -73,7 +73,7 @@ hello_world_cmd() {
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
local argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
[[ ! -z $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
set -- $cmd $@
##