mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
[FIX] remove empty logger message
This commit is contained in:
parent
a9a16f82d7
commit
8a3bcfa3af
@ -275,8 +275,10 @@ func createProgress(ctx context.Context, logger event.Logger) sideband.Progress
|
||||
if len(line) > 0 {
|
||||
progess := strings.Replace(string(line), "\r", "", -1)
|
||||
progess = strings.Replace(progess, "\n", "", -1)
|
||||
message := fmt.Sprintf(`{"progress":"%s","id":"%s"}`, progess, "获取源码:")
|
||||
logger.Debug(message, map[string]string{"step": "progress"})
|
||||
if len(progess) > 0 {
|
||||
message := fmt.Sprintf(`{"progress":"%s","id":"%s"}`, progess, "获取源码")
|
||||
logger.Debug(message, map[string]string{"step": "progress"})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,10 +219,12 @@ func ImageBuild(dockerCli *client.Client, contextDir string, options types.Image
|
||||
message := strings.Replace(string(line), "\n", "", -1)
|
||||
message = strings.Replace(message, "\r", "", -1)
|
||||
message = strings.Replace(message, "\u003e", ">", -1)
|
||||
if logger != nil {
|
||||
logger.Debug(message, map[string]string{"step": "build-progress"})
|
||||
} else {
|
||||
fmt.Println(message)
|
||||
if len(message) > 0 {
|
||||
if logger != nil {
|
||||
logger.Debug(message, map[string]string{"step": "build-progress"})
|
||||
} else {
|
||||
fmt.Println(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user