Skip to content

Commit

Permalink
Merge pull request #77133 from Infinisil/fix-path-check
Browse files Browse the repository at this point in the history
lib/types: Fix path type check
  • Loading branch information
infinisil committed Jan 7, 2020
2 parents 09e3b35 + d7a109b commit 65872f4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/types.nix
Expand Up @@ -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;
};

Expand Down

0 comments on commit 65872f4

Please sign in to comment.