mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
lib.strings.isStorePath: Use isSimpleCoercibleToString
Expecting no change in behavior.
This commit is contained in:
parent
67cfc7a8f6
commit
2b4a8db032
|
@ -829,7 +829,7 @@ rec {
|
||||||
=> false
|
=> false
|
||||||
*/
|
*/
|
||||||
isStorePath = x:
|
isStorePath = x:
|
||||||
if !(isList x) && isCoercibleToString x then
|
if isSimpleCoercibleToString x then
|
||||||
let str = toString x; in
|
let str = toString x; in
|
||||||
substring 0 1 str == "/"
|
substring 0 1 str == "/"
|
||||||
&& dirOf str == storeDir
|
&& dirOf str == storeDir
|
||||||
|
|
Loading…
Reference in a new issue