1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-28 04:23:58 +03:00

fix specs

This commit is contained in:
Jesse Duffield
2019-11-21 21:45:18 +11:00
parent f905b27b00
commit 67a446234c
6 changed files with 23 additions and 17 deletions

View File

@@ -59,9 +59,11 @@ func (c *OSCommand) SetCommand(cmd func(string, ...string) *exec.Cmd) {
}
// RunCommandWithOutput wrapper around commands returning their output and error
// NOTE: because this takes a format string followed by format args, you'll need
// to escape any percentage signs via '%%'.
func (c *OSCommand) RunCommandWithOutput(formatString string, formatArgs ...interface{}) (string, error) {
command := formatString
if len(formatArgs) > 0 {
if formatArgs != nil {
command = fmt.Sprintf(formatString, formatArgs...)
}
c.Log.WithField("command", command).Info("RunCommand")