diff options
author | jakobrs <jakobrs100@gmail.com> | 2021-06-18 08:32:45 +0200 |
---|---|---|
committer | jakobrs <jakobrs100@gmail.com> | 2021-06-18 08:32:45 +0200 |
commit | 7a0c1728acd7d7f5d86a2721e6c5ed1188463597 (patch) | |
tree | fb341f4cc7ddb381b16f3f85b79249cbaec6ad58 /nixos/lib | |
parent | ea34fe21e18f87dc8b333672f23edf2bcee98cd7 (diff) |
nixos/lib: Handle null `device` correctly
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/utils.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/utils.nix b/nixos/lib/utils.nix index 1a51b149e56e9..f1332ab559301 100644 --- a/nixos/lib/utils.nix +++ b/nixos/lib/utils.nix @@ -27,7 +27,7 @@ rec { # *not* a parent of b.device. If we add a slash at the end of each string, # though, this is not a problem: "/aaa/" is not a prefix of "/aaaa/". normalisePath = path: "${path}${optionalString (!(hasSuffix "/" path)) "/"}"; - normalise = mount: mount // { device = normalisePath mount.device; + normalise = mount: mount // { device = normalisePath (toString mount.device); mountPoint = normalisePath mount.mountPoint; depends = map normalisePath mount.depends; }; |