Merge pull request #127309 from jakobrs/nixos-normalise-null

Resolve evaluation failure when filesystem device option is null
This commit is contained in:
Kim Lindberger 2021-06-18 17:15:08 +02:00 committed by GitHub
commit 410496d0f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
};