fix(git): return empty on error

This commit is contained in:
Jan De Dobbeleer 2021-12-28 20:44:04 +01:00 committed by Jan De Dobbeleer
parent e2a907e121
commit 4ecf674e62

View file

@ -310,7 +310,10 @@ func (g *git) getGitCommand() string {
func (g *git) getGitCommandOutput(args ...string) string {
args = append([]string{"-C", g.gitRealFolder, "--no-optional-locks", "-c", "core.quotepath=false", "-c", "color.status=false"}, args...)
val, _ := g.env.runCommand(g.getGitCommand(), args...)
val, err := g.env.runCommand(g.getGitCommand(), args...)
if err != nil {
return ""
}
return val
}