1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

shell out custom commands

This commit is contained in:
Jesse Duffield
2021-04-01 20:10:24 +11:00
parent 8af3fe3b4a
commit e8e59306fc
3 changed files with 26 additions and 20 deletions

View File

@ -58,7 +58,7 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand
}
if customCommand.Subprocess {
gui.PrepareSubProcess(cmdStr)
gui.PrepareShellSubProcess(cmdStr)
return nil
}
@ -67,9 +67,7 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand
loadingText = gui.Tr.LcRunningCustomCommandStatus
}
return gui.WithWaitingStatus(loadingText, func() error {
gui.OSCommand.PrepareSubProcess(cmdStr)
if err := gui.OSCommand.RunCommand(cmdStr); err != nil {
if err := gui.OSCommand.RunShellCommand(cmdStr); err != nil {
return gui.surfaceError(err)
}
return gui.refreshSidePanels(refreshOptions{})