1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

runProgram(): Distinguish between empty input and no input

For example, if we call brotli with an empty input, it shouldn't read
from the caller's stdin.
This commit is contained in:
Eelco Dolstra 2017-03-15 14:40:47 +01:00
parent 042975ea8e
commit 25dff2b7db
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 30 additions and 15 deletions

View file

@ -92,7 +92,7 @@ static ref<std::string> decompressBzip2(const std::string & in)
static ref<std::string> decompressBrotli(const std::string & in)
{
// FIXME: use libbrotli
return make_ref<std::string>(runProgram(BRO, true, {"-d"}, in));
return make_ref<std::string>(runProgram(BRO, true, {"-d"}, {in}));
}
ref<std::string> compress(const std::string & method, const std::string & in)