IMP(shellcheck): replace ! -z by -n (SC2236)

This commit is contained in:
Thibault Ayanides
2020-12-04 15:14:18 +01:00
parent eaf56ca25e
commit d371b8d057
14 changed files with 29 additions and 30 deletions

View File

@ -44,7 +44,7 @@ audit() {
fi
done
IFS=$IFS_BAK
if [ ! -z "$RESULT" ]; then
if [ -n "$RESULT" ]; then
crit "Some admin accounts don't have any of $ACCEPTED_SHELLS as their login shell"
crit "$RESULT"
else
@ -71,7 +71,7 @@ apply() {
fi
done
IFS=$IFS_BAK
if [ ! -z "$RESULT" ]; then
if [ -n "$RESULT" ]; then
warn "Some admin accounts don't have any of $ACCEPTED_SHELLS as their login shell -- Fixing"
warn "$RESULT"
for USER in $(echo "$RESULT" | cut -d: -f 1); do