mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
feat(GODT-2611): bridge CLI exits on the first SIGINT / Ctrl+C.
This commit is contained in:
@ -20,6 +20,7 @@ package cli
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
"github.com/ProtonMail/gluon/async"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/bridge"
|
||||
@ -60,6 +61,11 @@ func New(
|
||||
panicHandler: panicHandler,
|
||||
}
|
||||
|
||||
// We want to exit at the first Ctrl+C. By default, ishell requires two.
|
||||
fe.Interrupt(func(_ *ishell.Context, _ int, _ string) {
|
||||
os.Exit(1)
|
||||
})
|
||||
|
||||
// Clear commands.
|
||||
clearCmd := &ishell.Cmd{
|
||||
Name: "clear",
|
||||
|
||||
Reference in New Issue
Block a user