diff --git a/src/segment_git.go b/src/segment_git.go index 0a16d5b4..32923e5f 100644 --- a/src/segment_git.go +++ b/src/segment_git.go @@ -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 }