2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 19:08:55 +00:00

Only print cache warning for terminals

This commit is contained in:
Alexander Neumann 2017-12-13 19:57:05 +01:00
parent d3ebe1311f
commit 2f26fb8834

View File

@ -388,9 +388,11 @@ func OpenRepository(opts GlobalOptions) (*repository.Repository, error) {
} }
} }
} else { } else {
if stdoutIsTerminal() {
Verbosef("found %d old cache directories in %v, pass --cleanup-cache to remove them\n", Verbosef("found %d old cache directories in %v, pass --cleanup-cache to remove them\n",
len(oldCacheDirs), c.Base) len(oldCacheDirs), c.Base)
} }
}
return s, nil return s, nil
} }