mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +02:00
use platform independent command to remove a file or directory
This commit is contained in:
parent
bd15f9d27a
commit
dcd3bb6bbd
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user