forked from lix-project/lix
nix repl: Reset the terminal on exceptional exits
This commit is contained in:
parent
b653fb9ccf
commit
3ef66cd23a
|
@ -279,6 +279,7 @@ bool NixRepl::getLine(string & input, const std::string &prompt)
|
|||
};
|
||||
|
||||
setupSignals();
|
||||
Finally resetTerminal([&]() { rl_deprep_terminal(); });
|
||||
char * s = readline(prompt.c_str());
|
||||
Finally doFree([&]() { free(s); });
|
||||
restoreSignals();
|
||||
|
|
Loading…
Reference in a new issue