Skip to content

fromYaml not defined #2217

@polds

Description

@polds

Description

  • What did you do?

Following the Parsing JSON/YAML into map variables section of the docs it recommends using the fromYaml template function to parse yaml.

  • What did you expect to happen?

fromYaml should be able to read a YAML string.

  • What happened instead?

I get this error:

template: resolver:1: function "fromYaml" not defined

Version

3.43.3

Operating system

macos

Experiments Enabled

No response

Example Taskfile

version: '3'

tasks:
  read-yaml:
    vars:
      FILE:
        sh: cat config.yaml
      PARSED:
        ref: 'fromYaml .FILE'
    cmds:
      - echo {{ .PARSED }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: templatingChanges related to the templating engine.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions