diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-17 11:13:21 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-17 11:13:21 +1000 |
commit | dcd3bb6bbde338715cb7ce249c88396fa2a97fe6 (patch) | |
tree | 824c7ef9cf2a754fcecb7736ba7c8212c042050d /pkg/commands/git.go | |
parent | bd15f9d27a9ed0af4e34fbacc38019a3ea3df2ef (diff) |
use platform independent command to remove a file or directory
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r-- | pkg/commands/git.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |