go-task/task · error

task: output style %q does not support the group begin/end p

Error message

task: output style %q does not support the group begin/end parameter

What it means

The `group.begin`/`group.end` output options are only valid with the `group` output style. checkOutputGroupUnset rejects any other style that has a group block set, preventing silently ignored configuration. It is called from BuildFor for styles like `prefixed` before constructing the output wrapper.

Source

Thrown at internal/output/output.go:44

	case "group":
		return Group{
			Begin:     o.Group.Begin,
			End:       o.Group.End,
			ErrorOnly: o.Group.ErrorOnly,
		}, nil
	case "prefixed":
		if err := checkOutputGroupUnset(o); err != nil {
			return nil, err
		}
		return NewPrefixed(logger), nil
	default:
		return nil, fmt.Errorf(`task: output style %q not recognized`, o.Name)
	}
}

func checkOutputGroupUnset(o *ast.Output) error {
	if o.Group.IsSet() {
		return fmt.Errorf("task: output style %q does not support the group begin/end parameter", o.Name)
	}
	return nil
}

View on GitHub (pinned to 385e5ad92a)

Solutions

  1. Remove the `group:` begin/end block, or switch the output style to `group`
  2. If you need both prefixes and grouping, use `output: group` (which supports prefixes via task-level prefix behavior) rather than prefixed
  3. Keep begin/end markers only under `output: group` configurations

Example fix

# before
output:
  prefixed: true
  group:
    begin: "::GROUP::"
# after
output:
  group:
    begin: "::GROUP::"
    end: "::END::"
Defensive patterns

Strategy: validation

Validate before calling

if o := taskDef.Output; o != nil && o.Style != "group" && (o.GroupBegin != "" || o.GroupEnd != "") {
  return fmt.Errorf("group begin/end only allowed with output: group")
}

Try / catch

err := t.Run(ctx)
if err != nil && strings.Contains(err.Error(), "does not support the group begin/end") {
  // either drop the group block or switch style to group
}

Prevention

When it happens

Trigger: A Taskfile sets `output: prefixed` (or another non-group style) together with a `group: {begin: ..., end: ...}` block; the IsSet check on o.Group triggers the error.

Common situations: Copying a group-begin/end snippet into a task that also uses `output: prefixed`, merging Taskfiles where one part expects grouped output, or misunderstanding that begin/end markers only apply to `output: group`.

Related errors


AI-assisted analysis of go-task/task@385e5ad92a (2026-09-05). Data as JSON: /api/errors/de1a7bd29bc49443. Report an issue: GitHub.