From e6449bb05831973a037da1f0bf2fcc6a7a62c2ca Mon Sep 17 00:00:00 2001 From: zhaoke Date: Wed, 10 May 2023 10:14:24 +0800 Subject: [PATCH] * Do not parse % in steps. --- internal/pkg/helper/script/extract.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pkg/helper/script/extract.go b/internal/pkg/helper/script/extract.go index 64018ddc..0802a1b5 100644 --- a/internal/pkg/helper/script/extract.go +++ b/internal/pkg/helper/script/extract.go @@ -291,12 +291,14 @@ func genDescFromRPE(file string) (steps []string, needExtract bool) { output := make([]string, 0) - content, err := cmd.CombinedOutput() + contentByte, err := cmd.CombinedOutput() if err != nil { return output, true } - output = strings.Split(string(content), "\n") + content := string(contentByte) + content = strings.ReplaceAll(content, "%", "%%") + output = strings.Split(content, "\n") os.Remove(md5FileName) return output, true -- GitLab