summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2024-10-22 10:20:43 +1100
committerMichael Hoang <enzime@users.noreply.github.com>2024-10-22 16:02:21 +1100
commitea7e178ad4113c2134c5b734e3198ebbc591af0b (patch)
tree84c75aa3a5cf0ffb9d6b1f8febbd3823d00d9f80 /tests
parent8451125cf8eab07056da090a4616ce46a1952ff9 (diff)
users: use `lib.escapeShellArg` for `createhomedir`
Diffstat (limited to 'tests')
-rw-r--r--tests/users-groups.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/users-groups.nix b/tests/users-groups.nix
index 72c6e0c..87babb3 100644
--- a/tests/users-groups.nix
+++ b/tests/users-groups.nix
@@ -44,7 +44,7 @@
# checking user creation in /activate
grep "sysadminctl -addUser ${lib.escapeShellArgs [ "foo" "-UID" 42000 "-GID" 42000 "-fullName" "Foo user" "-home" "/Users/foo" "-shell" "/run/current-system/sw/bin/bash" ]}" ${config.out}/activate
- grep "createhomedir -cu 'foo'" ${config.out}/activate
+ grep "createhomedir -cu ${lib.escapeShellArg "foo"}" ${config.out}/activate
grep "sysadminctl -addUser ${lib.escapeShellArgs [ "created.user" "-UID" 42001 ]} .* ${lib.escapeShellArgs [ "-shell" "/sbin/nologin" ]}" ${config.out}/activate
grep -qv "sysadminctl -deleteUser ${lib.escapeShellArg "created.user"}" ${config.out}/activate
grep -qv "sysadminctl -deleteUser ${lib.escapeShellArg "created.user"}" ${config.out}/activate