aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-07-27 14:23:24 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-07-27 14:24:03 +0200
commited5ad59dc16d8207f14c23f7fca903ee408eb54e (patch)
treef306c29b27760194717677327a547a6f9dcc3334 /src/nix/develop.cc
parentc000cec27fcb16548606830410be265eb082f777 (diff)
nix develop: Support chroot stores
Fixes #5024.
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index 9a93cdb03..55023545d 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -7,6 +7,7 @@
#include "derivations.hh"
#include "affinity.hh"
#include "progress-bar.hh"
+#include "run.hh"
#include <nlohmann/json.hpp>
@@ -472,8 +473,6 @@ struct CmdDevelop : Common, MixEnvironment
writeFull(rcFileFd.get(), script);
- stopProgressBar();
-
setEnviron();
// prevent garbage collection until shell exits
setenv("NIX_GCROOT", gcroot.data(), 1);
@@ -506,11 +505,7 @@ struct CmdDevelop : Common, MixEnvironment
auto args = phase || !command.empty() ? Strings{std::string(baseNameOf(shell)), rcFilePath}
: Strings{std::string(baseNameOf(shell)), "--rcfile", rcFilePath};
- restoreProcessContext();
-
- execvp(shell.c_str(), stringsToCharPtrs(args).data());
-
- throw SysError("executing shell '%s'", shell);
+ runProgramInStore(store, shell, args);
}
};