diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 44fd57f1c..3349e4860 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -359,7 +359,7 @@ func (c *GitCommand) IsInMergeState() (bool, error) { func (c *GitCommand) RemoveFile(file File) error { // if the file isn't tracked, we assume you want to delete it if !file.Tracked { - return c.OSCommand.RunCommand("rm -rf ./" + file.Name) + return os.RemoveAll(file.Name) } // if the file is tracked, we assume you want to just check it out return c.OSCommand.RunCommand("git checkout " + file.Name)