mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
a71e9bbd51
Per the Advanced Bash Scripting Guide: "The -n test requires that the string be quoted within the test brackets. Using an unquoted string with ! -z, or even just the unquoted string alone within test bracket normally works, however, this is an unsafe practice. Always quote a tested string." And indeed: $ unset FOOBAR $ [ -n $FOOBAR ] || echo nope $ [ -n "$FOOBAR" ] || echo nope nope Ran into this on a box w/o the attr program installed, and passed _require_attrs. Quoting the string fixes this; fix it there and other occurrences in common/* as well. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Dave Chinner <david@fromorbit.com>