mirror of
https://github.com/octoleo/restic.git
synced 2024-12-22 10:58:55 +00:00
Only print cache warning for terminals
This commit is contained in:
parent
d3ebe1311f
commit
2f26fb8834
@ -388,8 +388,10 @@ func OpenRepository(opts GlobalOptions) (*repository.Repository, error) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Verbosef("found %d old cache directories in %v, pass --cleanup-cache to remove them\n",
|
||||
len(oldCacheDirs), c.Base)
|
||||
if stdoutIsTerminal() {
|
||||
Verbosef("found %d old cache directories in %v, pass --cleanup-cache to remove them\n",
|
||||
len(oldCacheDirs), c.Base)
|
||||
}
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
Loading…
Reference in New Issue
Block a user