diff options
author | Domen Kožar <domen@dev.si> | 2020-04-11 13:12:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 13:12:11 +0200 |
commit | fc144242d5e1c84cfe0978b9989dca75d0e601ff (patch) | |
tree | 95f9b225763287b910223a768b327991ceafc8a4 /src/libexpr/primops.cc | |
parent | 3abf6d03c611417b309fdedf4323c08e6afbcd9c (diff) | |
parent | fc14213d2da7302b237dfe5ca51f6f4d9af34e5c (diff) |
Merge pull request #3447 from DavHau/improve-tofile-error-msg
improve toFile error message when containing potential drv path
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index d86ceb0e3..fc6c8296b 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -1020,7 +1020,9 @@ static void prim_toFile(EvalState & state, const Pos & pos, Value * * args, Valu for (auto path : context) { if (path.at(0) != '/') - throw EvalError(format("in 'toFile': the file '%1%' cannot refer to derivation outputs, at %2%") % name % pos); + throw EvalError(format( + "in 'toFile': the file named '%1%' must not contain a reference " + "to a derivation but contains (%2%), at %3%") % name % path % pos); refs.insert(state.store->parseStorePath(path)); } |