Skip to content

Commit

Permalink
save config when closing k9s with ctrl-c (#2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjiec authored May 3, 2024
1 parent e8fbbc1 commit a0ffa8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/ui/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ func (a *App) bindKeys() {

// BailOut exits the application.
func (a *App) BailOut() {
if err := a.Config.Save(true); err != nil {
log.Error().Err(err).Msg("config save failed!")
}

a.Stop()
os.Exit(0)
}
Expand Down

0 comments on commit a0ffa8f

Please sign in to comment.