aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build/substitution-goal.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-04-06 12:41:18 +0200
committerEelco Dolstra <edolstra@gmail.com>2022-04-06 12:43:53 +0200
commit318936366d5198123ae9ba0292538529f706dce8 (patch)
tree8b73119b3183b7f939433aa7cadc28ee60dfd1cf /src/libstore/build/substitution-goal.hh
parentfbeb8fd1b4beede0b1997ca10a14f345ba1a1c75 (diff)
Fix empty 'nix copy' error message
This was caused by SubstitutionGoal not setting the errorMsg field in its BuildResult. We now get a more descriptive message than in 2.7.0, e.g. error: path '/nix/store/13mh...' is required, but there is no substituter that can build it instead of the misleading (since there was no build) error: build of '/nix/store/13mh...' failed Fixes #6295.
Diffstat (limited to 'src/libstore/build/substitution-goal.hh')
-rw-r--r--src/libstore/build/substitution-goal.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/build/substitution-goal.hh b/src/libstore/build/substitution-goal.hh
index 946f13841..a73f8e666 100644
--- a/src/libstore/build/substitution-goal.hh
+++ b/src/libstore/build/substitution-goal.hh
@@ -53,7 +53,10 @@ struct PathSubstitutionGoal : public Goal
/* Content address for recomputing store path */
std::optional<ContentAddress> ca;
- void done(ExitCode result, BuildResult::Status status);
+ void done(
+ ExitCode result,
+ BuildResult::Status status,
+ std::optional<std::string> errorMsg = {});
public:
PathSubstitutionGoal(const StorePath & storePath, Worker & worker, RepairFlag repair = NoRepair, std::optional<ContentAddress> ca = std::nullopt);