From 1c7b332bf0e1a85805d12f76508483ac35fd1d30 Mon Sep 17 00:00:00 2001 From: wanghui Date: Wed, 20 Nov 2019 16:47:24 +0800 Subject: [PATCH] add empty slice check --- cli/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/client.go b/cli/client.go index f3602624c..ff82455ba 100644 --- a/cli/client.go +++ b/cli/client.go @@ -230,6 +230,10 @@ var clientRetrieveCmd = &cli.Command{ // TODO: parse offer strings from `client find`, make this smarter + if len(offers) < 1 { + fmt.Println("Failed to find file") + return nil + } order := offers[0].Order() order.Client = payer