From 7398b0e711a835c3a1ebe765ce7da0598d9651f6 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:37:10 -0500 Subject: [PATCH] Fix anonymous paths in cobra code-gen (#14185) --- 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) }