Use -n instead of not -z
This commit is contained in:
parent
ae28b0a8a3
commit
db06baeede
1 changed files with 3 additions and 3 deletions
6
arkdep
6
arkdep
|
@ -146,14 +146,14 @@ healthcheck () {
|
|||
# Clean whitespaces
|
||||
untracked=$(echo $untracked | xargs)
|
||||
|
||||
if [[ ! -z $untracked ]]; then
|
||||
if [[ -n $untracked ]]; then
|
||||
printf '\e[1;33m<!>\e[0m\e[1m The following deployments were found but are untracked\n\e[0m'
|
||||
for t in ${untracked[@]}; do
|
||||
printf "$t\n"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ! -z $hanging_cache ]]; then
|
||||
if [[ -n $hanging_cache ]]; then
|
||||
printf '\e[1;33m<!>\e[0m\e[1m The following hanging images were found in cache\n\e[0m'
|
||||
for t in ${hanging_cache[@]}; do
|
||||
printf "$t\n"
|
||||
|
@ -363,7 +363,7 @@ remove_deployment () {
|
|||
printf 'No deployment defined\n' && exit 1
|
||||
|
||||
# Ensure user only provided a single target
|
||||
[[ ! -z $2 ]] && \
|
||||
[[ -n $2 ]] && \
|
||||
printf 'Multiple targets provided, remove only accepts a single target at a time\n' && exit 1
|
||||
|
||||
# Ensure requested deployment is tracked
|
||||
|
|
Loading…
Add table
Reference in a new issue