diff --git a/bin/_test-run.sh b/bin/_test-run.sh index eef778688..512474c86 100755 --- a/bin/_test-run.sh +++ b/bin/_test-run.sh @@ -136,7 +136,7 @@ check_if_k8s_reachable(){ remove_l5d_if_exists() { resources=$(kubectl --context=$k8s_context get all,clusterrole,clusterrolebinding,mutatingwebhookconfigurations,validatingwebhookconfigurations,psp,crd -l linkerd.io/control-plane-ns --all-namespaces -oname) - if [ ! -z "$resources" ]; then + if [ -n "$resources" ]; then printf 'Removing existing l5d installation...' cleanup printf '[ok]\n' diff --git a/bin/fmt b/bin/fmt index baf424512..2cd3fa432 100755 --- a/bin/fmt +++ b/bin/fmt @@ -10,7 +10,7 @@ dirs=$(go list -f \{\{.Dir\}\} ./... | grep -v controller/gen) # dedup them. files=$(bin/goimports -l $dirs | sort | uniq) -if [ ! -z "$files" ]; then +if [ -n "$files" ]; then for file in $files; do bin/goimports -d "$@" "$file" done