From b4c078d565af69bcb2f46adc20e528e53ae32908 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 7 Dec 2021 21:59:36 +1100 Subject: WIP --- pkg/gui/gui.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pkg/gui/gui.go') diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 4a2248935..39d2a9763 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -7,7 +7,6 @@ import ( "os" "sync" - "os/exec" "strings" "time" @@ -578,7 +577,7 @@ func (gui *Gui) RunAndHandleError() error { } // returns whether command exited without error or not -func (gui *Gui) runSubprocessWithSuspenseAndRefresh(subprocess *exec.Cmd) error { +func (gui *Gui) runSubprocessWithSuspenseAndRefresh(subprocess oscommands.ICmdObj) error { _, err := gui.runSubprocessWithSuspense(subprocess) if err != nil { return err @@ -592,7 +591,7 @@ func (gui *Gui) runSubprocessWithSuspenseAndRefresh(subprocess *exec.Cmd) error } // returns whether command exited without error or not -func (gui *Gui) runSubprocessWithSuspense(subprocess *exec.Cmd) (bool, error) { +func (gui *Gui) runSubprocessWithSuspense(subprocess oscommands.ICmdObj) (bool, error) { gui.Mutexes.SubprocessMutex.Lock() defer gui.Mutexes.SubprocessMutex.Unlock() @@ -621,7 +620,8 @@ func (gui *Gui) runSubprocessWithSuspense(subprocess *exec.Cmd) (bool, error) { return cmdErr == nil, gui.surfaceError(cmdErr) } -func (gui *Gui) runSubprocess(subprocess *exec.Cmd) error { +func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { + subprocess := cmdObj.GetCmd() subprocess.Stdout = os.Stdout subprocess.Stderr = os.Stdout subprocess.Stdin = os.Stdin -- cgit v1.2.3