Skip to content

FailIfMultiNodes hardcodes "talm template" in error message, confusing apply callers #121

Closed

Description

Problem

pkg/engine/engine.go:210 calls:

helpers.FailIfMultiNodes(ctx, "talm template")

The string "talm template" is used in the error message: command "talm template" is not supported with multiple nodes. This was accurate when engine.Render was only called from the template subcommand, but after #119 it is also called from apply. A user running talm apply who hits this check will see an error mentioning talm template, which is confusing.

Proposed fix

Thread the caller command name through engine.Options:

type Options struct {
    // ...
    CommandName string // e.g., "talm apply" or "talm template"
}

Then use opts.CommandName in the FailIfMultiNodes call, with a sensible default.

References

Activity

  1. added a commit that references this issue on Apr 16, 2026
    8c0148c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions