mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
4169c1f70f
The Go 1.24 tool directive uses single-token entries inside a tool ( ... ) block. The previous splitter treated any tab-indented line as a require entry, causing an index out of range panic when running hugo mod tidy on a module with a tool block. Track the require block state explicitly so other blocks (tool, replace, exclude, retract) are left untouched. Fixes #14783
28 lines
373 B
Plaintext
28 lines
373 B
Plaintext
# Test hugo mod tidy.
|
|
|
|
hugo mod tidy
|
|
|
|
cmp go.mod golden/go.mod.cleaned
|
|
|
|
-- hugo.toml --
|
|
title = "Hugo Modules Test"
|
|
-- go.mod --
|
|
go 1.19
|
|
|
|
require github.com/bep/empty-hugo-module v1.0.0
|
|
|
|
tool (
|
|
github.com/gohugoio/hugo
|
|
)
|
|
|
|
module github.com/gohugoio/testmod
|
|
-- golden/go.mod.cleaned --
|
|
go 1.19
|
|
|
|
|
|
tool (
|
|
github.com/gohugoio/hugo
|
|
)
|
|
|
|
module github.com/gohugoio/testmod
|