1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

Get rid of some unchecked calls to std::cout

This commit is contained in:
Eelco Dolstra 2023-03-02 15:02:24 +01:00
parent 09f5975c6a
commit b69a73a230
15 changed files with 36 additions and 39 deletions

View file

@ -112,11 +112,11 @@ struct CmdEval : MixJSON, InstallableCommand, MixReadOnlyOption
else if (raw) {
stopProgressBar();
std::cout << *state->coerceToString(noPos, *v, context, "while generating the eval command output");
writeFull(STDOUT_FILENO, *state->coerceToString(noPos, *v, context, "while generating the eval command output"));
}
else if (json) {
std::cout << printValueAsJSON(*state, true, *v, pos, context, false).dump() << std::endl;
logger->cout("%s", printValueAsJSON(*state, true, *v, pos, context, false));
}
else {