about summary refs log tree commit diff
path: root/third_party/nix/src/nix/run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix/run.cc')
-rw-r--r--third_party/nix/src/nix/run.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/third_party/nix/src/nix/run.cc b/third_party/nix/src/nix/run.cc
index 9827360f0a..fa471bd542 100644
--- a/third_party/nix/src/nix/run.cc
+++ b/third_party/nix/src/nix/run.cc
@@ -30,7 +30,7 @@ struct CmdRun : InstallablesCommand {
         .description("command and arguments to be executed; defaults to 'bash'")
         .labels({"command", "args"})
         .arity(ArityAny)
-        .handler([&](std::vector<std::string> ss) {
+        .handler([&](const std::vector<std::string>& ss) {
           if (ss.empty()) {
             throw UsageError("--command requires at least one argument");
           }
@@ -227,7 +227,7 @@ void chrootHelper(int argc, char** argv) {
       throw SysError("mounting '%s' on '%s'", realStoreDir, storeDir);
     }
 
-    for (auto entry : readDirectory("/")) {
+    for (const auto& entry : readDirectory("/")) {
       auto src = "/" + entry.name;
       auto st = lstat(src);
       if (!S_ISDIR(st.st_mode)) {