diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-09-22 14:00:56 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-09-22 14:00:56 +0200 |
commit | ff28fffce26bba37685f7e230d1285e7d034f748 (patch) | |
tree | 03a86258e45320d311c2a7a9d2782a12e7f4980e /src/libexpr | |
parent | bcd73ebf60bb9ba6cb09f8df4366d5474c16e4a4 (diff) |
Don't cache realiseContext() errors
Errors that depend on the configuration (such as whether
allow-import-from-derivation is set) should not be cached.
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/primops.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 8a087a781..c98a30177 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -52,7 +52,8 @@ void EvalState::realiseContext(const PathSet & context) if (drvs.empty()) return; if (!evalSettings.enableImportFromDerivation) - throw EvalError("attempted to realize '%1%' during evaluation but 'allow-import-from-derivation' is false", + throw Error( + "cannot build '%1%' during evaluation because the option 'allow-import-from-derivation' is disabled", store->printStorePath(drvs.begin()->drvPath)); /* For performance, prefetch all substitute info. */ |