File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ func NewContainer(
7979}
8080
8181func (c * Container ) Start () error {
82+ if c .program .Started () {
83+ return nil
84+ } else if c .program .Suspended () {
85+ if err := c .program .Resume (); err != nil {
86+ return fmt .Errorf ("unable to resume program - %w" , err )
87+ }
88+ }
89+
8290 go func () {
8391 _ , err := c .program .Run ()
8492 if err != nil && ! errors .Is (err , tea .ErrProgramKilled ) {
@@ -260,7 +268,9 @@ func (c *Container) Ready() bool {
260268func (c * Container ) Shutdown (finalizers ... func ()) {
261269 fin := make (chan struct {})
262270 c .finalizing = & fin
271+ _ = c .program .program .ReleaseTerminal ()
263272 c .program .program .Kill ()
273+ fmt .Println () // Ensure a new line after the program is killed
264274 for _ , f := range finalizers {
265275 f ()
266276 }
You can’t perform that action at this time.
0 commit comments