mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
Fix "Failed tcsetattr(TCSADRAIN)" when nix repl
is not a TTY
Before: ``` $ echo builtins.nixVersion | nix repl Welcome to Nix 2.18.1. Type :? for help. Failed tcsetattr(TCSADRAIN): Inappropriate ioctl for device "2.18.1" Failed tcsetattr(TCSADRAIN): Inappropriate ioctl for device ``` After: ``` $ echo builtins.nixVersion | nix repl Nix 2.21.0pre20240131_dirty Type :? for help. "2.21.0pre20240131_dirty" ```
This commit is contained in:
parent
5b26c66a8c
commit
a694cfb7bd
@ -351,7 +351,6 @@ bool NixRepl::getLine(std::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 New Issue
Block a user