diff --git a/pkg/commands/git.go b/pkg/commands/git.go index a4cef9407..65392e607 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -139,7 +139,7 @@ func NewGitCommandAux( return workingTreeCommands.ShowFileDiff(from, to, reverse, filename, previousPath, plain) }, func() (string, error) { - return os.MkdirTemp("", "lazygit-custom-patch-") + return os.MkdirTemp(osCommand.GetTempDir(), "custom-patch-") }) patchCommands := git_commands.NewPatchCommands(gitCommon, rebaseCommands, commitCommands, statusCommands, stashCommands, patchBuilder) bisectCommands := git_commands.NewBisectCommands(gitCommon)