From 7842000f8a99b3010e60f9b7a73531e9a656ccd0 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 24 May 2023 12:20:29 +0100 Subject: [PATCH] backend: for command not found errors, hint to look in the underlying remote See: https://forum.rclone.org/t/rclone-cleanup-no-way-to-delete-pending-uploads-newer-than-24-hours/38416/6 --- cmd/backend/backend.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/backend/backend.go b/cmd/backend/backend.go index 67d499923..9a95a5e89 100644 --- a/cmd/backend/backend.go +++ b/cmd/backend/backend.go @@ -98,8 +98,14 @@ Note to run these commands on a running backend then see out, err = doCommand(context.Background(), name, arg, opt) } if err != nil { + if err == fs.ErrorCommandNotFound { + extra := "" + if f.Features().Overlay { + extra = " (try the underlying remote)" + } + return fmt.Errorf("%q %w%s", name, err, extra) + } return fmt.Errorf("command %q failed: %w", name, err) - } // Output the result writeJSON := false