diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-06-29 17:54:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 17:54:41 +0200 |
commit | 3b18058969c57961ec6c7496020cce48bfb64edc (patch) | |
tree | 515bf99b8a334ffa6b5149dcb6bd6f7bbbda0f5d /src | |
parent | 4248174e7165f48f92416d13b862e3ef8192a34b (diff) | |
parent | c6f7726f48e83230246f9328115368547fe29f5f (diff) |
Merge pull request #6674 from virusdave/dnicponski/scratch/dont_capture_stdout_in_nix_repl_master
Don't capture `stdout` when launching subshells in `nix repl`
Diffstat (limited to 'src')
-rw-r--r-- | src/libcmd/repl.cc | 9 |
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 |