diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-30 11:35:15 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-12-30 11:35:15 +1100 |
commit | b21997d6b4cbdf84b149d8e6a2c4d06a8e9ec164 (patch) | |
tree | 184a2fa499390ac6ea45a9a0cb26349ceb1c106c /pkg | |
parent | e94e8fc5b6fab4cb755f29f1bdb3ee5e001df35c (diff) |
fix logging
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/commands/git.go | 2 | ||||
-rw-r--r-- | pkg/commands/oscommands/os.go | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index b83fa1b73..950042780 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -99,6 +99,8 @@ func (c *GitCommand) WithSpan(span string) *GitCommand { *newGitCommand = *c newGitCommand.OSCommand = c.OSCommand.WithSpan(span) + newGitCommand.Cmd = NewGitCmdObjBuilder(c.Log, newGitCommand.OSCommand.Cmd) + // NOTE: unlike the other things here which create shallow clones, this will // actually update the PatchManager on the original struct to have the new span. // This means each time we call ApplyPatch in PatchManager, we need to ensure diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go index e9bf1814e..eb5a81d63 100644 --- a/pkg/commands/oscommands/os.go +++ b/pkg/commands/oscommands/os.go @@ -116,6 +116,8 @@ func (c *OSCommand) WithSpan(span string) *OSCommand { newOSCommand := &OSCommand{} *newOSCommand = *c newOSCommand.CmdLogSpan = span + newOSCommand.Cmd.logCmdObj = newOSCommand.LogCmdObj + newOSCommand.Cmd.runner = &Runner{log: c.Log, logCmdObj: newOSCommand.LogCmdObj} return newOSCommand } |