1
mirror of https://github.com/rclone/rclone synced 2024-11-24 01:26:25 +01:00

about: fix crash if backend returns a nil usage

This commit is contained in:
Nick Craig-Wood 2019-05-09 14:29:31 +01:00
parent 7d70e92664
commit 9950bb9b7c

View File

@ -95,6 +95,9 @@ Use the --json flag for a computer readable output, eg
if err != nil {
return errors.Wrap(err, "About call failed")
}
if u == nil {
return errors.New("nil usage returned")
}
if jsonOutput {
out := json.NewEncoder(os.Stdout)
out.SetIndent("", "\t")