aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 4cb8ade08..45f63bb7e 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -58,7 +58,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
if (outLink != "")
if (auto store2 = store.dynamic_pointer_cast<LocalFSStore>())
- for (size_t i = 0; i < buildables.size(); ++i)
+ for (const auto & [i, buildable] : enumerate(buildables)) {
std::visit(overloaded {
[&](BuildableOpaque bo) {
std::string symlink = outLink;
@@ -74,7 +74,8 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile
store2->addPermRoot(output.second, absPath(symlink));
}
},
- }, buildables[i]);
+ }, buildable);
+ }
updateProfile(buildables);