diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-09-04 01:17:38 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-09-04 01:17:38 +0000 |
commit | aad4abcc9c27d5c1a2349e40f51f076387e0f844 (patch) | |
tree | 6feff2254239cc48c9b75c52dc6741479516cd65 /src/libstore/derivations.cc | |
parent | 4409530fc948a038688c5f0505be2efd5af2b0df (diff) |
Fix floating CA tests
We will sometimes try to query the outputs of derivations we can't
resolve. That's fine; it just means we don't know what those outputs are
yet.
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index ce57a5bb0..695265860 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -671,7 +671,7 @@ static void rewriteDerivation(Store & store, BasicDerivation & drv, const String Sync<DrvPathResolutions> drvPathResolutions; -BasicDerivation Derivation::resolve(Store & store) { +std::optional<BasicDerivation> Derivation::tryResolve(Store & store) { BasicDerivation resolved { *this }; // Input paths that we'll want to rewrite in the derivation @@ -683,7 +683,7 @@ BasicDerivation Derivation::resolve(Store & store) { for (auto & outputName : input.second) { auto actualPathOpt = inputDrvOutputs.at(outputName); if (!actualPathOpt) - throw Error("input drv '%s' wasn't yet built", store.printStorePath(input.first)); + return std::nullopt; auto actualPath = *actualPathOpt; inputRewrites.emplace( downstreamPlaceholder(store, input.first, outputName), |