Merge pull request 2139 from restic/fail-zero-bytes-stdin

Return error when reading zero byte from stdin
This commit is contained in:
Alexander Neumann
2019-02-10 12:34:05 +01:00
5 changed files with 118 additions and 11 deletions

View File

@@ -0,0 +1,10 @@
Bugfix: Return error when no bytes could be read from stdin
We assume that users reading backup data from stdin want to know when no data
could be read, so now restic returns an error when `backup --stdin` is called
but no bytes could be read. Usually, this means that an earlier command in a
pipe has failed. The documentation was amended and now recommends setting the
`pipefail` option (`set -o pipefail`).
https://github.com/restic/restic/pull/2135
https://github.com/restic/restic/pull/2139