mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 20:10:56 -08:00
fix(git): return empty on error
This commit is contained in:
parent
e2a907e121
commit
4ecf674e62
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue