mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
Merge pull request #3343 from hluup/3334
Display 'created new cache in ' message only if output is terminal
This commit is contained in:
commit
d456437ad1
9
changelog/unreleased/issue-3334
Normal file
9
changelog/unreleased/issue-3334
Normal file
@ -0,0 +1,9 @@
|
||||
Bugfix: Print `created new cache` message only on a terminal
|
||||
|
||||
`created new cache` message was outputed even when the output wasn't a
|
||||
terminal. That broke piping `restic dump` output to tar or zip
|
||||
if cache directory didn't exist. The message is now only printed on a
|
||||
terminal.
|
||||
|
||||
https://github.com/restic/restic/issues/3334
|
||||
https://github.com/restic/restic/pull/3343
|
@ -492,7 +492,7 @@ func OpenRepository(opts GlobalOptions) (*repository.Repository, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
if c.Created && !opts.JSON {
|
||||
if c.Created && !opts.JSON && stdoutIsTerminal() {
|
||||
Verbosef("created new cache in %v\n", c.Base)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user