1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 04:56:01 +01:00

Clean up standard stream logic

Now we have enough portability stuff
This commit is contained in:
John Ericson 2024-11-07 13:15:03 -05:00
parent 0ed5af164f
commit 372353722e
9 changed files with 44 additions and 18 deletions

View file

@ -543,7 +543,7 @@ public:
auto state(state_.lock());
if (!state->active) return {};
std::cerr << fmt("\r\e[K%s ", msg);
auto s = trim(readLine(STDIN_FILENO, true));
auto s = trim(readLine(getStandardInput(), true));
if (s.size() != 1) return {};
draw(*state);
return s[0];