summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-12-30 11:35:15 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-04 09:07:15 +1100
commit9d4ff6b46512aa5261ab6218d978737a0b33359d (patch)
tree0897d1f0f8c534f00c471f507c9e70d9e8b77859 /pkg
parent95f4ceea343880babb7046258a26b8c062853c36 (diff)
fix logging
Diffstat (limited to 'pkg')
-rw-r--r--pkg/commands/git.go2
-rw-r--r--pkg/commands/oscommands/os.go2
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
}