mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Fix shellcheck SC2006 warnings in test_switch_id.sh
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
o Code simplification and refactoring (shell scripts):
|
||||
- Cleanup test_switch_id.sh to silence shellcheck warnings. Closes
|
||||
ticket 29065.
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user