mirror of
https://github.com/charmbracelet/gum
synced 2024-06-08 16:52:17 +02:00
feat: Adding timeout option in preparation for coming timeout features in all commands
This commit is contained in:
parent
938a3cf97c
commit
ae1b75807d
|
@ -10,7 +10,8 @@ import (
|
|||
"github.com/charmbracelet/gum/style"
|
||||
)
|
||||
|
||||
const ABORTED = 130
|
||||
// Aborted is the exit code when the user aborts the confirmation.
|
||||
const Aborted = 130
|
||||
|
||||
// Run provides a shell script interface for prompting a user to confirm an
|
||||
// action with an affirmative or negative answer.
|
||||
|
@ -33,7 +34,7 @@ func (o Options) Run() error {
|
|||
}
|
||||
|
||||
if m.(model).aborted {
|
||||
os.Exit(ABORTED)
|
||||
os.Exit(Aborted)
|
||||
} else if m.(model).confirmation {
|
||||
os.Exit(0)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue