Merge pull request #77133 from Infinisil/fix-path-check
lib/types: Fix path type check
This commit is contained in:
commit
65872f407e
|
@ -242,8 +242,7 @@ rec {
|
||||||
|
|
||||||
path = mkOptionType {
|
path = mkOptionType {
|
||||||
name = "path";
|
name = "path";
|
||||||
# Hacky: there is no ‘isPath’ primop.
|
check = x: isCoercibleToString x && builtins.substring 0 1 (toString x) == "/";
|
||||||
check = x: builtins.substring 0 1 (toString x) == "/";
|
|
||||||
merge = mergeEqualOption;
|
merge = mergeEqualOption;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue