summaryrefslogtreecommitdiffstats
path: root/pkg/commands/oscommands
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-11-13 14:10:18 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-11-13 14:10:21 +1100
commitdf3cd941d7342a13df92e10f6726a1f1998ddf75 (patch)
treec97d97a8587fca92a1006acf4bd85cf4b950f0b6 /pkg/commands/oscommands
parentea28529cbb4c462117c26de85254922d72365dda (diff)
use tempdir in tests to prevent polluting worktree
Diffstat (limited to 'pkg/commands/oscommands')
-rw-r--r--pkg/commands/oscommands/dummies.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/commands/oscommands/dummies.go b/pkg/commands/oscommands/dummies.go
index b5978e4b5..3f72a6f06 100644
--- a/pkg/commands/oscommands/dummies.go
+++ b/pkg/commands/oscommands/dummies.go
@@ -19,6 +19,7 @@ type OSCommandDeps struct {
GetenvFn func(string) string
RemoveFileFn func(string) error
Cmd *CmdObjBuilder
+ TempDir string
}
func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand {
@@ -38,6 +39,7 @@ func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand {
getenvFn: deps.GetenvFn,
removeFileFn: deps.RemoveFileFn,
guiIO: NewNullGuiIO(utils.NewDummyLog()),
+ tempDir: deps.TempDir,
}
}