diff --git a/ui/ui.go b/ui/ui.go index 4529675..153b2d1 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -294,6 +294,9 @@ func update(msg tea.Msg, mdl tea.Model) (tea.Model, tea.Cmd) { } else { // The keygen ran but things still didn't work and we can't auth m.stash.err = errors.New("SSH authentication failed; we tried ssh-agent, loading keys from disk, and generating SSH keys") + if debug { + log.Println(m.stash.err) + } // Even though it failed, news/stash loading is finished m.stash.loaded |= loadedStash | loadedNews @@ -303,6 +306,9 @@ func update(msg tea.Msg, mdl tea.Model) (tea.Model, tea.Cmd) { case keygenFailedMsg: // Keygen failed. That sucks. m.stash.err = errors.New("could not authenticate; could not generate SSH keys") + if debug { + log.Println(m.stash.err) + } m.keygenState = keygenFinished // Even though it failed, news/stash loading is finished @@ -515,6 +521,9 @@ func loadNews(m stashModel) tea.Cmd { } func generateSSHKeys() tea.Msg { + if debug { + log.Println("running keygen...") + } _, err := keygen.NewSSHKeyPair(nil) if err != nil { if debug { @@ -522,6 +531,9 @@ func generateSSHKeys() tea.Msg { } return keygenFailedMsg{err} } + if debug { + log.Println("keys generated succcessfully") + } return keygenSuccessMsg{} }