diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-07 21:59:36 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-04 09:07:15 +1100 |
commit | b4c078d565af69bcb2f46adc20e528e53ae32908 (patch) | |
tree | 7a336c0169b7eab49765d39f7a0dd5537e919ba2 /pkg/gui/gui.go | |
parent | 157dd309f75f2ce3c23be53ddd2e4baa49a67321 (diff) |
WIP
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 8 |
1 files changed, 4 insertions, 4 deletions
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 |