]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add quotes for -n
authorGaoyi <ymuemc@163.com>
Fri, 26 Jun 2020 05:55:41 +0000 (13:55 +0800)
committerLennart Poettering <lennart@poettering.net>
Fri, 26 Jun 2020 13:12:29 +0000 (15:12 +0200)
According to SC2070, -n doesn't work with unquoted arguments
https://github.com/koalaman/shellcheck/wiki/SC2070

Signed-off-by: Gaoyi <ymuemc@163.com>
test/units/testsuite-36.sh

index d04751b3f0780464f455d199093c7408950417f2..aed938437be2356240a1f50b435898b6e18e2cb4 100755 (executable)
@@ -120,7 +120,7 @@ systemctlCheckNUMAProperties() {
 
     > "$LOGFILE"
 
-    if [ -n $3 ]; then
+    if [ -n "$3" ]; then
         systemctl show -p NUMAMask $1 > "$LOGFILE"
         grep "NUMAMask=$3" "$LOGFILE"
     fi