diff options
Diffstat (limited to 'pkg/gui/custom_commands.go')
-rw-r--r-- | pkg/gui/custom_commands.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go index 8f98d6597..06526b6f0 100644 --- a/pkg/gui/custom_commands.go +++ b/pkg/gui/custom_commands.go @@ -203,7 +203,7 @@ func (gui *Gui) menuPromptFromCommand(prompt config.CustomCommandPrompt, promptR } // Run and save output - message, err := gui.GitCommand.RunCommandWithOutput(cmdStr) + message, err := gui.GitCommand.RunWithOutput(gui.GitCommand.NewCmdObj(cmdStr)) if err != nil { return gui.surfaceError(err) } @@ -244,7 +244,7 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand } if customCommand.Subprocess { - return gui.runSubprocessWithSuspenseAndRefresh(gui.OSCommand.PrepareShellSubProcess(cmdStr)) + return gui.runSubprocessWithSuspenseAndRefresh(gui.OSCommand.NewShellCmdObjFromString2(cmdStr)) } loadingText := customCommand.LoadingText @@ -252,7 +252,8 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand loadingText = gui.Tr.LcRunningCustomCommandStatus } return gui.WithWaitingStatus(loadingText, func() error { - if err := gui.OSCommand.WithSpan(gui.Tr.Spans.CustomCommand).RunShellCommand(cmdStr); err != nil { + cmdObj := gui.OSCommand.NewShellCmdObjFromString(cmdStr) + if err := gui.OSCommand.WithSpan(gui.Tr.Spans.CustomCommand).Run(cmdObj); err != nil { return gui.surfaceError(err) } return gui.refreshSidePanels(refreshOptions{}) |