From 04127c5b129bfa42ba63f480e7cd2937bb3b3b4f Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Tue, 18 Jun 2024 16:40:41 +0800 Subject: [PATCH] fix: forbid --- examples/healthcheck/asciifile | 2 +- pkg/healthcheck/forbidden.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/healthcheck/asciifile b/examples/healthcheck/asciifile index ff1d788..a0a9a6a 160000 --- a/examples/healthcheck/asciifile +++ b/examples/healthcheck/asciifile @@ -1 +1 @@ -Subproject commit ff1d788beeae458682296c77ea759ad6b0313c01 +Subproject commit a0a9a6a629d48179fb2647027e5fadad242b2601 diff --git a/pkg/healthcheck/forbidden.go b/pkg/healthcheck/forbidden.go index 16549f8..7cd6d71 100644 --- a/pkg/healthcheck/forbidden.go +++ b/pkg/healthcheck/forbidden.go @@ -66,7 +66,7 @@ func ForbiddenCheck(rootDir string, regexList []string, repo string, droneBranch strings.Join(forbids, ", ") + "\n\nTo fix it, first make a backup of your repository and then run the following commands:\nfor i in " + strings.Join(forbids, " ") + - fmt.Sprint("; do git filter-repo --force --invert-paths --path \\\"\\$i\\\"; done\ngit remote add origin ", + fmt.Sprint("; do git filter-repo --force --invert-paths --path \"$i\"; done\ngit remote add origin ", repo, "\ngit push --set-upstream origin ", droneBranch, " --force") return fmt.Errorf(message) }