diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-01-07 16:43:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 16:43:50 +0100 |
commit | 65872f407e75bca68620d4ed33e41bbcf264579c (patch) | |
tree | 1b2027d69f9ff7775d79144befacf8a70a4e64a4 /lib/types.nix | |
parent | 09e3b355a9fe4a3cf9d170651edb8bec2ac96e6f (diff) | |
parent | d7a109b59f18756fa36a6f6439f11a9eb07e8d86 (diff) |
Merge pull request #77133 from Infinisil/fix-path-check
lib/types: Fix path type check
Diffstat (limited to 'lib/types.nix')
-rw-r--r-- | lib/types.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/types.nix b/lib/types.nix index bb1b17e6beeee..4872a67665716 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -242,8 +242,7 @@ rec { path = mkOptionType { name = "path"; - # Hacky: there is no ‘isPath’ primop. - check = x: builtins.substring 0 1 (toString x) == "/"; + check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/"; merge = mergeEqualOption; }; |