mirror of
https://github.com/rclone/rclone
synced 2024-11-28 06:41:41 +01:00
about: fix crash if backend returns a nil usage
This commit is contained in:
parent
7d70e92664
commit
9950bb9b7c
@ -95,6 +95,9 @@ Use the --json flag for a computer readable output, eg
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "About call failed")
|
return errors.Wrap(err, "About call failed")
|
||||||
}
|
}
|
||||||
|
if u == nil {
|
||||||
|
return errors.New("nil usage returned")
|
||||||
|
}
|
||||||
if jsonOutput {
|
if jsonOutput {
|
||||||
out := json.NewEncoder(os.Stdout)
|
out := json.NewEncoder(os.Stdout)
|
||||||
out.SetIndent("", "\t")
|
out.SetIndent("", "\t")
|
||||||
|
Loading…
Reference in New Issue
Block a user