Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions launcher/jnlp/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ func (launcher *Launcher) Terminate() {
}
}

// Wait waits for the executed command to exit
func (launcher *Launcher) Wait() (*os.ProcessState, error) {
if launcher.cmd == nil || launcher.cmd.Process == nil {
return nil, errors.New("process not running")
}

return launcher.cmd.Process.Wait()
}

func (launcher *Launcher) CheckPlatform() error {
if err := settings.EnsureJavaExecutableAvailability(); err != nil {
return errors.Wrap(err, "java executable wasn't found")
Expand Down
2 changes: 2 additions & 0 deletions launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package launcher

import (
"net/url"
"os"
"strings"

"github.com/pkg/errors"
Expand All @@ -21,6 +22,7 @@ type Launcher interface {
UninstallByFilename(filename string, showGUI bool) error
UninstallByURL(url string, showGUI bool) error
SetLogFile(logFile string)
Wait() (*os.ProcessState, error)
}

type Options struct {
Expand Down