From 6ffdce8abf065a72a9a71a71b4701b11a6ff69b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sat, 27 Apr 2019 18:10:38 +0200 Subject: [PATCH] add: return error from iterator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Ɓukasz Magiera --- core/commands/add.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/commands/add.go b/core/commands/add.go index 5416d143832..15b707dc761 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -267,6 +267,10 @@ You can now check what blocks have been created by: added++ } + if addit.Err() != nil { + return addit.Err() + } + if added == 0 { return fmt.Errorf("expected a file argument") }