Skip to content

Commit 51e8409

Browse files
authored
nixos-container: avoid subshell when testing $PRIVATE_USERS (#383056)
2 parents d1e7ea7 + 57c96ff commit 51e8409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nixos/modules/virtualisation/nixos-containers.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ let
118118
NIX_BIND_OPT=""
119119
if [ -n "$PRIVATE_USERS" ]; then
120120
extraFlags+=("--private-users=$PRIVATE_USERS")
121-
if [ "$PRIVATE_USERS" = "pick" ] || ( [ "$PRIVATE_USERS" != "identity" ] && [ "$PRIVATE_USERS" -gt 0 ] ); then
121+
if [ "$PRIVATE_USERS" = "pick" ] || { [ "$PRIVATE_USERS" != "identity" ] && [ "$PRIVATE_USERS" -gt 0 ]; }; then
122122
# when user namespacing is enabled, we use `idmap` mount option
123123
# so that bind mounts under /nix get proper owner (and not nobody/nogroup).
124124
NIX_BIND_OPT=":idmap"

0 commit comments

Comments
 (0)