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:
parent
042975ea8e
commit
25dff2b7db
5 changed files with 30 additions and 15 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue