2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 22:27:35 +00:00

cache/check: Clarify error message when given arguments

This commit is contained in:
Leo R. Lundgren 2020-10-06 00:08:59 +02:00
parent 5d8cfff3f2
commit e105a3f391
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ func init() {
func runCache(opts CacheOptions, gopts GlobalOptions, args []string) error { func runCache(opts CacheOptions, gopts GlobalOptions, args []string) error {
if len(args) > 0 { if len(args) > 0 {
return errors.Fatal("the cache command has no arguments") return errors.Fatal("the cache command expects no arguments, only options - please see `restic help cache` for usage and flags")
} }
if gopts.NoCache { if gopts.NoCache {

View File

@ -142,7 +142,7 @@ func prepareCheckCache(opts CheckOptions, gopts *GlobalOptions) (cleanup func())
func runCheck(opts CheckOptions, gopts GlobalOptions, args []string) error { func runCheck(opts CheckOptions, gopts GlobalOptions, args []string) error {
if len(args) != 0 { if len(args) != 0 {
return errors.Fatal("check has no arguments") return errors.Fatal("the check command expects no arguments, only options - please see `restic help check` for usage and flags")
} }
cleanup := prepareCheckCache(opts, &gopts) cleanup := prepareCheckCache(opts, &gopts)