Skip to content

Commit

Permalink
cmd-init: fix SC2236
Browse files Browse the repository at this point in the history
https://www.shellcheck.net/wiki/SC2236 -- Use -n instead of ! -z.
  • Loading branch information
miabbott authored and cgwalters committed Nov 10, 2018
1 parent bd2dcbf commit 3e4e24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd-init
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fi

# If the current working dir is not empty then error out
# unless force provided
if [ "$FORCE" != "1" ] && [ ! -z "$(ls -A ./)" ]; then
if [ "$FORCE" != "1" ] && [ -n "$(ls -A ./)" ]; then
fatal "init: current directory is not empty, override with --force"
fi

Expand Down

0 comments on commit 3e4e24a

Please sign in to comment.