aboutsummaryrefslogtreecommitdiffstats
path: root/bug/operations/label_change.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/operations/label_change.go')
-rw-r--r--bug/operations/label_change.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bug/operations/label_change.go b/bug/operations/label_change.go
index 568e132e..a711faef 100644
--- a/bug/operations/label_change.go
+++ b/bug/operations/label_change.go
@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/MichaelMure/git-bug/bug"
"io"
+ "io/ioutil"
"sort"
)
@@ -61,6 +62,10 @@ func NewLabelChangeOperation(author bug.Person, added, removed []bug.Label) Labe
func ChangeLabels(out io.Writer, b *bug.Bug, author bug.Person, add, remove []string) error {
var added, removed []bug.Label
+ if out == nil {
+ out = ioutil.Discard
+ }
+
snap := b.Compile()
for _, str := range add {