aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/build-remote/build-remote.cc6
-rw-r--r--src/libstore/build/derivation-goal.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc
index 350bd6cef..68af3e966 100644
--- a/src/build-remote/build-remote.cc
+++ b/src/build-remote/build-remote.cc
@@ -75,11 +75,11 @@ static int main_build_remote(int argc, char * * argv)
/* It would be more appropriate to use $XDG_RUNTIME_DIR, since
that gets cleared on reboot, but it wouldn't work on macOS. */
- currentLoad = "/current-load";
+ auto currentLoadName = "/current-load";
if (auto localStore = store.dynamic_pointer_cast<LocalFSStore>())
- currentLoad = std::string { localStore->stateDir } + currentLoad;
+ currentLoad = std::string { localStore->stateDir } + currentLoadName;
else
- currentLoad = settings.nixStateDir + currentLoad;
+ currentLoad = settings.nixStateDir + currentLoadName;
std::shared_ptr<Store> sshStore;
AutoCloseFD bestSlotLock;
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 953e241d8..fa8b99118 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -3291,7 +3291,7 @@ void DerivationGoal::registerOutputs()
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
if (!localStoreP)
- Unsupported("Can only register outputs with local store");
+ throw Unsupported("can only register outputs with local store, but this is %s", worker.store.getUri());
auto & localStore = *localStoreP;
if (buildMode == bmCheck) {
@@ -3426,7 +3426,7 @@ void DerivationGoal::registerOutputs()
{
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
if (!localStoreP)
- Unsupported("Can only register outputs with local store");
+ throw Unsupported("can only register outputs with local store, but this is %s", worker.store.getUri());
auto & localStore = *localStoreP;
ValidPathInfos infos2;