Skip to content

Commit a0ffa8f

Browse files
authored
save config when closing k9s with ctrl-c (#2666)
1 parent e8fbbc1 commit a0ffa8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

internal/ui/app.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ func (a *App) bindKeys() {
151151

152152
// BailOut exits the application.
153153
func (a *App) BailOut() {
154+
if err := a.Config.Save(true); err != nil {
155+
log.Error().Err(err).Msg("config save failed!")
156+
}
157+
154158
a.Stop()
155159
os.Exit(0)
156160
}

0 commit comments

Comments
 (0)