1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-06-20 01:19:23 +02:00

Cleanup: use oscommands.RemoveFile rather than plain os.Remove

This makes it mockable for tests, and is consistent with other uses in this
file.
This commit is contained in:
Stefan Haller
2026-03-22 15:36:25 +01:00
parent d241ec4ee1
commit 706a6c0474
+1 -2
View File
@@ -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
}
}