From e105a3f39115db64c314756ca6dc9421c40a1796 Mon Sep 17 00:00:00 2001 From: "Leo R. Lundgren" Date: Tue, 6 Oct 2020 00:08:59 +0200 Subject: [PATCH] cache/check: Clarify error message when given arguments --- cmd/restic/cmd_cache.go | 2 +- cmd/restic/cmd_check.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/restic/cmd_cache.go b/cmd/restic/cmd_cache.go index 2b75419b6..89fb2c0df 100644 --- a/cmd/restic/cmd_cache.go +++ b/cmd/restic/cmd_cache.go @@ -51,7 +51,7 @@ func init() { func runCache(opts CacheOptions, gopts GlobalOptions, args []string) error { 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 { diff --git a/cmd/restic/cmd_check.go b/cmd/restic/cmd_check.go index 5d156ef78..3c638ff5a 100644 --- a/cmd/restic/cmd_check.go +++ b/cmd/restic/cmd_check.go @@ -142,7 +142,7 @@ func prepareCheckCache(opts CheckOptions, gopts *GlobalOptions) (cleanup func()) func runCheck(opts CheckOptions, gopts GlobalOptions, args []string) error { 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)