From 390087f66365f09b5a1147545311b7e69f642d7c Mon Sep 17 00:00:00 2001 From: glennliao Date: Fri, 14 Jan 2022 19:58:12 +0800 Subject: [PATCH] fix gfcli build error: [FATA] Error: exit status 128 --- internal/cmd/cmd_build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/cmd_build.go b/internal/cmd/cmd_build.go index 3599efb..ee193e8 100644 --- a/internal/cmd/cmd_build.go +++ b/internal/cmd/cmd_build.go @@ -288,13 +288,13 @@ func (c cBuild) getGitCommit() string { if gproc.SearchBinary("git") == "" { return "" } - s, err := gproc.ShellExec(`git log -1 --format="%cd %H" --date=format:"%Y-%m-%d %H:%M:%S"`) + s, err := gproc.ShellExec(`git log -1 --format=%cd_%H --date=format:%Y-%m-%d_%H:%M:%S`) if err != nil { mlog.Fatal(err) } if s != "" { if !gstr.Contains(s, "fatal") { - return gstr.Trim(s) + return gstr.Trim(gstr.Replace(s, "_", " ")) } } return ""