aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/fetchClosure.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/primops/fetchClosure.cc')
-rw-r--r--src/libexpr/primops/fetchClosure.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc
index c66fed633..6d2271853 100644
--- a/src/libexpr/primops/fetchClosure.cc
+++ b/src/libexpr/primops/fetchClosure.cc
@@ -58,12 +58,11 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg
bool inputAddressed = inputAddressedMaybe.value_or(false);
if (inputAddressed) {
- if (toPath && toPath != fromPath)
+ if (toPath)
throw Error({
- .msg = hintfmt("attribute '%s' is set to true, but 'toPath' does not match 'fromPath'. 'toPath' should be equal, or should be omitted. Instead 'toPath' was '%s' and 'fromPath' was '%s'",
+ .msg = hintfmt("attribute '%s' is set to true, but '%s' is also set. Please remove one of them",
"inputAddressed",
- state.store->printStorePath(*toPath),
- state.store->printStorePath(*fromPath)),
+ "toPath"),
.errPos = state.positions[pos]
});
assert(!enableRewriting);