mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Add showOutput option to custom commands (#1163)
This commit is contained in:
parent
367b0d3318
commit
e1f41b653c
2 changed files with 5 additions and 1 deletions
|
@ -187,10 +187,13 @@ func (self *HandlerCreator) finalHandler(customCommand config.CustomCommand, ses
|
|||
if customCommand.Stream {
|
||||
cmdObj.StreamOutput()
|
||||
}
|
||||
err := cmdObj.Run()
|
||||
output, err := cmdObj.RunWithOutput()
|
||||
if err != nil {
|
||||
return self.c.Error(err)
|
||||
}
|
||||
if customCommand.ShowOutput {
|
||||
return self.c.Alert(cmdStr, output)
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue