From 706a6c047487f8107874f46724a62cb41e121bd5 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 22 Mar 2026 15:36:25 +0100 Subject: [PATCH] Cleanup: use oscommands.RemoveFile rather than plain os.Remove This makes it mockable for tests, and is consistent with other uses in this file. --- pkg/commands/git_commands/working_tree.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/working_tree.go b/pkg/commands/git_commands/working_tree.go index 7aafe3655..48c20a690 100644 --- a/pkg/commands/git_commands/working_tree.go +++ b/pkg/commands/git_commands/working_tree.go @@ -219,8 +219,7 @@ func (self *WorkingTreeCommands) RemoveUntrackedDirFiles(node IFileNode) error { ) for _, path := range untrackedFilePaths { - err := os.Remove(path) - if err != nil { + if err := self.os.RemoveFile(path); err != nil { return err } }