diff options
author | Michael Muré <batolettre@gmail.com> | 2018-10-17 21:42:13 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-10-17 21:42:13 +0200 |
commit | d37ffa6bd49f6f39a4de03dc2fa101832a1befe8 (patch) | |
tree | ec2a2b1f261eed43d3ace51e5ba4d806189539b9 /commands/comment_add.go | |
parent | f67c57c08407b935c82b8f47d36823725351efe0 (diff) | |
download | git-bug-d37ffa6bd49f6f39a4de03dc2fa101832a1befe8.tar.gz |
commands: unify the processing from editor/file/stdin for "add" and "comment add"
fix #68
Diffstat (limited to 'commands/comment_add.go')
-rw-r--r-- | commands/comment_add.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/comment_add.go b/commands/comment_add.go index 5a7cd6a8..d0912844 100644 --- a/commands/comment_add.go +++ b/commands/comment_add.go @@ -27,13 +27,13 @@ func runCommentAdd(cmd *cobra.Command, args []string) error { } if commentAddMessageFile != "" && commentAddMessage == "" { - commentAddMessage, err = input.FromFile(commentAddMessageFile) + commentAddMessage, err = input.BugCommentFileInput(commentAddMessageFile) if err != nil { return err } } - if commentAddMessage == "" { + if commentAddMessageFile == "" && commentAddMessage == "" { commentAddMessage, err = input.BugCommentEditorInput(backend, "") if err == input.ErrEmptyMessage { fmt.Println("Empty message, aborting.") |