summaryrefslogtreecommitdiff
path: root/pkg/gui/queuehandler.go
diff options
context:
space:
mode:
authorİbrahim Serdar Açıkgöz <serdaracikgoz86@gmail.com>2018-12-12 18:38:02 +0300
committerİbrahim Serdar Açıkgöz <serdaracikgoz86@gmail.com>2018-12-12 18:38:02 +0300
commita1abe10a125e1b74c38726f02565140b1a440b95 (patch)
tree3e75807e0ab6eada4916f97784627c656ffe187b /pkg/gui/queuehandler.go
parentMerge branch 'develop' of github.com:isacikgoz/gitbatch into develop (diff)
downloadgitbatch-a1abe10a125e1b74c38726f02565140b1a440b95.tar.gz
implementing authentication for fetch operation
Diffstat (limited to 'pkg/gui/queuehandler.go')
-rw-r--r--pkg/gui/queuehandler.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/gui/queuehandler.go b/pkg/gui/queuehandler.go
index 3be1472..cec6f8b 100644
--- a/pkg/gui/queuehandler.go
+++ b/pkg/gui/queuehandler.go
@@ -1,7 +1,9 @@
package gui
import (
+ "github.com/isacikgoz/gitbatch/pkg/git"
"github.com/jroimartin/gocui"
+ log "github.com/sirupsen/logrus"
)
// this function starts the queue and updates the gui with the result of an
@@ -16,6 +18,13 @@ func (gui *Gui) startQueue(g *gocui.Gui, v *gocui.View) error {
})
defer gui.updateKeyBindingsView(g, mainViewFeature.Name)
if err != nil {
+ if err == git.ErrAuthenticationRequired {
+ err := gui_go.openAuthenticationView(g, gui_go.State.Queue, job, v.Name())
+ if err != nil {
+ log.Warn(err.Error())
+ return
+ }
+ }
return
}
if finished {