From 57a715879ac673751198cd92cac006a1003e3086 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 15:46:28 -0500 Subject: [PATCH] [release-15.0] Fix anonymous paths in cobra code-gen (#14185) (#14235) Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> --- go/cmd/internal/docgen/docgen.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/cmd/internal/docgen/docgen.go b/go/cmd/internal/docgen/docgen.go index 16b237ea15f..eda94cfefb4 100644 --- a/go/cmd/internal/docgen/docgen.go +++ b/go/cmd/internal/docgen/docgen.go @@ -193,8 +193,8 @@ func anonymizeHomedir(file string) (err error) { // We're replacing the stuff inside the square brackets in the example sed // below: - // 's:Paths to search for config files in. (default \[.*\])$:Paths to search for config files in. (default \[$WORKDIR\]):' - sed := exec.Command("sed", "-i", "", "-e", fmt.Sprintf("s:%s:$WORKDIR:i", wd), file) + // 's:Paths to search for config files in. (default \[.*\])$:Paths to search for config files in. (default \[\]):' + sed := exec.Command("sed", "-i", "", "-e", fmt.Sprintf("s:%s::i", wd), file) if out, err := sed.CombinedOutput(); err != nil { return fmt.Errorf("%w: %s", err, out) }