diff options
Diffstat (limited to 'third_party/nix/src/nix/run.cc')
-rw-r--r-- | third_party/nix/src/nix/run.cc | 4 |
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 9827360f0aa9..fa471bd542a1 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)) { |