mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 13:45:45 +01:00
fix: handle huh user aborted error at main (#578)
This commit is contained in:
parent
4222e59c25
commit
2b0a4c033e
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
|
@ -7,6 +7,7 @@ import (
|
|||
"runtime/debug"
|
||||
|
||||
"github.com/alecthomas/kong"
|
||||
"github.com/charmbracelet/huh"
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/muesli/termenv"
|
||||
|
||||
|
|
@ -72,7 +73,7 @@ func main() {
|
|||
},
|
||||
)
|
||||
if err := ctx.Run(); err != nil {
|
||||
if errors.Is(err, exit.ErrAborted) {
|
||||
if errors.Is(err, exit.ErrAborted) || errors.Is(err, huh.ErrUserAborted) {
|
||||
os.Exit(exit.StatusAborted)
|
||||
}
|
||||
fmt.Println(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue