aboutsummaryrefslogtreecommitdiff
path: root/src/nix/run.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/run.cc')
-rw-r--r--src/nix/run.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index b888281a5..321ee1d11 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -111,16 +111,16 @@ struct CmdShell : InstallablesCommand, RunCommon, MixEnvironment
std::unordered_set<StorePath> done;
std::queue<StorePath> todo;
- for (auto & path : outPaths) todo.push(path.clone());
+ for (auto & path : outPaths) todo.push(path);
setEnviron();
auto unixPath = tokenizeString<Strings>(getEnv("PATH").value_or(""), ":");
while (!todo.empty()) {
- auto path = todo.front().clone();
+ auto path = todo.front();
todo.pop();
- if (!done.insert(path.clone()).second) continue;
+ if (!done.insert(path).second) continue;
if (true)
unixPath.push_front(store->printStorePath(path) + "/bin");
@@ -197,10 +197,10 @@ void chrootHelper(int argc, char * * argv)
Finally freeCwd([&]() { free(cwd); });
if (chroot(tmpDir.c_str()) == -1)
- throw SysError(format("chrooting into '%s'") % tmpDir);
+ throw SysError("chrooting into '%s'", tmpDir);
if (chdir(cwd) == -1)
- throw SysError(format("chdir to '%s' in chroot") % cwd);
+ throw SysError("chdir to '%s' in chroot", cwd);
} else
if (mount(realStoreDir.c_str(), storeDir.c_str(), "", MS_BIND, 0) == -1)
throw SysError("mounting '%s' on '%s'", realStoreDir, storeDir);