Skip to content

config/allconfig: Error not thrown when output format is not defined #13199

@jmooring

Description

@jmooring

Reference: https://discourse.gohugo.io/t/seems-hugo-no-longer-throw-an-error-if-output-format-is-invalid/52912

This worked as expected through v0.122.0. Failing test:

// Issue 13199
func TestInvalidOutputFormat(t *testing.T) {
	t.Parallel()

	files := `
-- hugo.toml --
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
[outputs]
home = ['html','foo']
-- layouts/index.html --
x
`

	b, err := hugolib.TestE(t, files)
	b.Assert(err.Error(), qt.Contains, `failed to create config: unknown output format "foo" for kind "home"`)
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions