Browse Source

Fix shellcheck SC2006 warnings in test_switch_id.sh

rl1987 5 years ago
parent
commit
b7dced893a
2 changed files with 5 additions and 2 deletions
  1. 3 0
      changes/ticket29065
  2. 2 2
      src/test/test_switch_id.sh

+ 3 - 0
changes/ticket29065

@@ -0,0 +1,3 @@
+  o Code simplification and refactoring (shell scripts):
+    - Cleanup test_switch_id.sh to silence shellcheck warnings. Closes
+      ticket 29065.

+ 2 - 2
src/test/test_switch_id.sh

@@ -1,11 +1,11 @@
 #!/bin/sh
 
-if test "`id -u`" != '0'; then
+if test "$(id -u)" != '0'; then
     echo "This test only works when run as root. Skipping." >&2
     exit 77
 fi
 
-if test "`id -u nobody`" = ""; then
+if test "$(id -u nobody)" = ""; then
     echo "This test requires that your system have a 'nobody' user. Sorry." >&2
     exit 1
 fi