Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

backend: for command not found errors, hint to look in the underlying remote

Nick Craig-Wood7842000f8a99
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