aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/repl.cc
diff options
context:
space:
mode:
authorDave Nicponski <dave.nicponski@gmail.com>2022-06-15 12:49:12 -0400
committerDave Nicponski <dave.nicponski@gmail.com>2022-06-23 22:45:13 -0400
commitc6f7726f48e83230246f9328115368547fe29f5f (patch)
tree6ee77455818aa51deffdf9289312dddbc3bae62b /src/libcmd/repl.cc
parent9f58df4c91007aa9f4eb701fd6667ac3ed39c8fa (diff)
Don't capture stdout when launching subshells in `nix repl`
Diffstat (limited to 'src/libcmd/repl.cc')
-rw-r--r--src/libcmd/repl.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 3c89a8ea3..588115a48 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -111,23 +111,20 @@ NixRepl::~NixRepl()
write_history(historyFile.c_str());
}
-std::string runNix(Path program, const Strings & args,
+void runNix(Path program, const Strings & args,
const std::optional<std::string> & input = {})
{
auto subprocessEnv = getEnv();
subprocessEnv["NIX_CONFIG"] = globalConfig.toKeyValue();
- auto res = runProgram(RunOptions {
+ runProgram2(RunOptions {
.program = settings.nixBinDir+ "/" + program,
.args = args,
.environment = subprocessEnv,
.input = input,
});
- if (!statusOk(res.first))
- throw ExecError(res.first, "program '%1%' %2%", program, statusToString(res.first));
-
- return res.second;
+ return;
}
static NixRepl * curRepl; // ugly