1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Merge pull request #10618 from srhb/editor-pause-repl

nix repl: hide progress bar during :edit
This commit is contained in:
Eelco Dolstra 2024-04-29 12:37:17 +02:00 committed by GitHub
commit 4161f3cfea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -506,6 +506,10 @@ ProcessLineResult NixRepl::processLine(std::string line)
auto editor = args.front();
args.pop_front();
// avoid garbling the editor with the progress bar
logger->pause();
Finally resume([&]() { logger->resume(); });
// runProgram redirects stdout to a StringSink,
// using runProgram2 to allow editors to display their UI
runProgram2(RunOptions { .program = editor, .lookupPath = true, .args = args });