{"id":"8b23d7751b660f3d","repo":"gohugoio/hugo","slug":"the-goat-cli-s-is-not-installed","errorCode":null,"errorMessage":"the GoAT CLI (%s) is not installed","messagePattern":"the GoAT CLI \\((.+?)\\) is not installed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"markup/asciidocext/internal/converter.go","lineNumber":300,"sourceCode":"\n\t// Verify that the required AsciiDoc converter extension is installed.\n\tsc := security.DefaultConfig\n\tsc.Exec.Allow = security.MustNewWhitelist(gemBinaryName)\n\tex := hexec.New(sc, \"\", loggers.NewDefault())\n\n\targs := []any{\"list\", asciiDocDiagramExtension, \"--installed\"}\n\tcmd, err := ex.New(gemBinaryName, args...)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\terr = cmd.Run()\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"the %s gem is not installed\", asciiDocDiagramExtension)\n\t}\n\n\t// Verify that the GoAT CLI is installed.\n\tif !hexec.InPath(goatBinaryName) {\n\t\treturn false, fmt.Errorf(\"the GoAT CLI (%s) is not installed\", goatBinaryName)\n\t}\n\n\treturn true, nil\n}\n\n// extractTOC extracts the toc from the given src html.\n// It returns the html without the TOC, and the TOC data\nfunc (a *AsciiDocConverter) extractTOC(src []byte) ([]byte, *tableofcontents.Fragments, error) {\n\tvar buf bytes.Buffer\n\tbuf.Write(src)\n\tnode, err := html.Parse(&buf)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tvar (\n\t\tf       func(*html.Node) bool\n\t\ttoc     *tableofcontents.Fragments\n\t\ttoVisit []*html.Node","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/gohugoio/hugo/blob/8a468df065a75c1c7cf9f6850f32148746590ea5/markup/asciidocext/internal/converter.go#L282-L318","documentation":"The last check in `CanRenderGoATDiagrams()`: the `asciidoctor-diagram` extension delegates GoAT (Go ASCII Tool) diagram rendering to an external `goat` executable, and Hugo verifies it is in `$PATH`. Without it, AsciiDoc GoAT diagram blocks cannot be rendered even though asciidoctor and the diagram gem are present.","triggerScenarios":"`CanRenderGoATDiagrams()` running where asciidoctor, gem, and the asciidoctor-diagram gem all check out but no `goat` binary is resolvable in `$PATH`.","commonSituations":"Hugo contributors running the asciidocext test suite; users setting up GoAT diagrams in AsciiDoc content who installed the Ruby side but not the Go-based `goat` CLI, or installed it to `$GOPATH/bin` without adding that to PATH.","solutions":["Install the GoAT CLI: `go install github.com/blampe/goat/cmd/goat@latest`.","Ensure `$GOPATH/bin` (or `$HOME/go/bin`) is on `$PATH`; verify with `which goat`.","If GoAT diagrams aren't needed, ignore — this only gates the diagram-rendering capability/tests."],"exampleFix":"# before: goat missing\n# after\ngo install github.com/blampe/goat/cmd/goat@latest\nexport PATH=\"$HOME/go/bin:$PATH\"","handlingStrategy":"validation","validationCode":"if _, err := exec.LookPath(\"goat\"); err != nil {\n    return fmt.Errorf(\"GoAT CLI missing: %w\", err)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the GoAT CLI (`go install github.com/blampe/goat/cmd/goat@latest`) before enabling GoAT diagram processing","Add a PATH preflight check for all external diagram tools your content uses","Keep external-tool versions pinned in your build image"],"tags":["hugo","asciidoc","goat","diagrams","dependency-check"],"analyzedSha":"8a468df065a75c1c7cf9f6850f32148746590ea5","analyzedAt":"2026-07-31T21:23:07.045Z","schemaVersion":2}