1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 11:21:47 +02:00

nix repl: hide progress bar during :edit

(cherry picked from commit e5f509ef0b)
This commit is contained in:
Sarah Brofeldt 2024-04-28 16:32:58 +02:00 committed by Jörg Thalheim
parent 374715cb44
commit 12967aea53

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 });