Skip to content

Commit

Permalink
fix: do not make api call when --list, --delete, etc (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 authored Jun 3, 2024
1 parent 0c63172 commit 6f730ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mods.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ func (m *Mods) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if m.Input == "" && m.Config.Prefix == "" && m.Config.Show == "" && !m.Config.ShowLast {
return m, m.quit
}
if m.Config.Dirs ||
m.Config.Delete != "" ||
m.Config.DeleteOlderThan != 0 ||
m.Config.ShowHelp ||
m.Config.List ||
m.Config.Settings ||
m.Config.ResetSettings {
return m, m.quit
}

if m.Config.IncludePromptArgs {
m.appendToOutput(m.Config.Prefix + "\n\n")
Expand Down

0 comments on commit 6f730ff

Please sign in to comment.