summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-17 11:13:21 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-17 11:13:21 +1000
commitdcd3bb6bbde338715cb7ce249c88396fa2a97fe6 (patch)
tree824c7ef9cf2a754fcecb7736ba7c8212c042050d /pkg/commands/git.go
parentbd15f9d27a9ed0af4e34fbacc38019a3ea3df2ef (diff)
use platform independent command to remove a file or directory
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go2
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)