Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Allow users to exit the TUI when there are extra args (#4274)
Miccah301aade3086d
diff --git a/pkg/tui/tui.go b/pkg/tui/tui.goindex bba7f1bd4..9e833bffc 100644--- a/pkg/tui/tui.go+++ b/pkg/tui/tui.go@@ -143,10 +143,16 @@ func (ui *TUI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {switch {case key.Matches(msg, ui.common.KeyMap.Help):case key.Matches(msg, ui.common.KeyMap.CmdQuit) && ui.activePage() != sourceConfigurePage:+ ui.args = nilreturn ui, tea.Quitcase key.Matches(msg, ui.common.KeyMap.Quit):+ ui.args = nilreturn ui, tea.Quit- case ui.activePage() > 0 && key.Matches(msg, ui.common.KeyMap.Back):+ case key.Matches(msg, ui.common.KeyMap.Back):+ if ui.activePage() == wizardIntroPage {+ ui.args = nil+ return ui, tea.Quit+ }_ = ui.popHistory()return ui, nil}@@ -159,6 +165,7 @@ func (ui *TUI) Update(msg tea.Msg) (tea.Model, tea.Cmd) {switch item {case wizard_intro.Quit:+ ui.args = nilcmds = append(cmds, tea.Quit)case wizard_intro.ViewOSSProject:ui.setActivePage(viewOSSProjectPage)