mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Apply suggestions from code review
Thanks! Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
8c07ed1dda
commit
53a709535b
2 changed files with 5 additions and 5 deletions
|
@ -75,11 +75,11 @@ static int main_build_remote(int argc, char * * argv)
|
||||||
|
|
||||||
/* It would be more appropriate to use $XDG_RUNTIME_DIR, since
|
/* It would be more appropriate to use $XDG_RUNTIME_DIR, since
|
||||||
that gets cleared on reboot, but it wouldn't work on macOS. */
|
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>())
|
if (auto localStore = store.dynamic_pointer_cast<LocalFSStore>())
|
||||||
currentLoad = std::string { localStore->stateDir } + currentLoad;
|
currentLoad = std::string { localStore->stateDir } + currentLoadName;
|
||||||
else
|
else
|
||||||
currentLoad = settings.nixStateDir + currentLoad;
|
currentLoad = settings.nixStateDir + currentLoadName;
|
||||||
|
|
||||||
std::shared_ptr<Store> sshStore;
|
std::shared_ptr<Store> sshStore;
|
||||||
AutoCloseFD bestSlotLock;
|
AutoCloseFD bestSlotLock;
|
||||||
|
|
|
@ -3291,7 +3291,7 @@ void DerivationGoal::registerOutputs()
|
||||||
|
|
||||||
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
|
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
|
||||||
if (!localStoreP)
|
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;
|
auto & localStore = *localStoreP;
|
||||||
|
|
||||||
if (buildMode == bmCheck) {
|
if (buildMode == bmCheck) {
|
||||||
|
@ -3426,7 +3426,7 @@ void DerivationGoal::registerOutputs()
|
||||||
{
|
{
|
||||||
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
|
auto localStoreP = dynamic_cast<LocalStore *>(&worker.store);
|
||||||
if (!localStoreP)
|
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;
|
auto & localStore = *localStoreP;
|
||||||
|
|
||||||
ValidPathInfos infos2;
|
ValidPathInfos infos2;
|
||||||
|
|
Loading…
Reference in a new issue