forked from TrueCloudLab/rclone
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
This commit is contained in:
parent
1f9c962183
commit
7842000f8a
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue