aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Egberts <git@nielsegberts.nl>2021-07-09 21:50:10 +0100
committerNiels Egberts <git@nielsegberts.nl>2021-07-09 21:50:10 +0100
commitae0ed53b09cba991551e984f474bf5732d26d3f3 (patch)
treeb1d29a59c6cc494823b405f437f35cde949d2164
parent9cf991f421b20a2c753df1f93730ddc8ddf7af6c (diff)
toString also coerces a set with an outPath attribute to a string
nix-repl> builtins.toString { outPath = "somestring"; } "somestring"
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index e8569b654..209a05d11 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -3109,7 +3109,7 @@ static RegisterPrimOp primop_toString({
- A path (e.g., `toString /foo/bar` yields `"/foo/bar"`.
- - A set containing `{ __toString = self: ...; }`.
+ - A set containing `{ __toString = self: ...; }` or `{ outPath = ...; }`.
- An integer.