feat: Adding timeout option in preparation for coming timeout features in all commands

This commit is contained in:
Dieter Eickstaedt 2023-06-29 22:26:52 +02:00
parent 938a3cf97c
commit ae1b75807d

View file

@ -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 {