1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-08 18:28:31 +03:00

simplify how we log commands

This commit is contained in:
Jesse Duffield
2022-01-05 11:57:32 +11:00
parent e524e39842
commit 05fa483f48
44 changed files with 291 additions and 233 deletions

View File

@@ -66,7 +66,9 @@ func RunCommandWithOutputLiveAux(
startCmd func(cmd *exec.Cmd) (*cmdHandler, error),
) error {
c.Log.WithField("command", cmdObj.ToString()).Info("RunCommand")
c.LogCommand(cmdObj.ToString(), true)
if cmdObj.ShouldLog() {
c.LogCommand(cmdObj.ToString(), true)
}
cmd := cmdObj.AddEnvVars("LANG=en_US.UTF-8", "LC_ALL=en_US.UTF-8").GetCmd()
var stderr bytes.Buffer