1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-17 00:18:05 +02:00

Change not to use cat command

This commit is contained in:
Ryooooooga
2021-08-23 22:35:19 +09:00
committed by Jesse Duffield
parent 711bd5a670
commit c3d7de1c18
5 changed files with 6 additions and 39 deletions

View File

@ -2,6 +2,7 @@ package commands
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@ -15,7 +16,11 @@ import (
// CatFile obtains the content of a file
func (c *GitCommand) CatFile(fileName string) (string, error) {
return c.OSCommand.CatFile(fileName)
buf, err := ioutil.ReadFile(fileName)
if err != nil {
return "", nil
}
return string(buf), nil
}
func (c *GitCommand) OpenMergeToolCmd() string {