🤖 This issue has been opened by Claude Code.
Summary
When an engine.env value contains a colon-space sequence (: ), the gh-aw compiler emits it as an unquoted YAML plain scalar in the lock file. YAML parsers then misinterpret the : as a nested mapping entry, causing a parse error.
Steps to reproduce
Add an env var whose value contains : to engine.env in a workflow frontmatter:
engine:
env:
ANTHROPIC_CUSTOM_HEADERS: "x-aw-gw-github-repo: ${{ github.repository }}"
Run gh aw compile. The generated lock file contains:
env:
ANTHROPIC_CUSTOM_HEADERS: x-aw-gw-github-repo: ${{ github.repository }}
This is invalid YAML — the : after x-aw-gw-github-repo is parsed as a mapping separator.
Error
generated lock file is not valid YAML: [N:37] mapping value is not allowed in this context
ANTHROPIC_CUSTOM_HEADERS: x-aw-gw-github-repo: ${{ github.repository }}
^
Expected behaviour
The compiler should detect that the value requires quoting and emit it as a quoted scalar:
ANTHROPIC_CUSTOM_HEADERS: "x-aw-gw-github-repo: ${{ github.repository }}"
Workaround
Use a format() expression to avoid the literal : in the compiled YAML:
ANTHROPIC_CUSTOM_HEADERS: "${{ format('x-aw-gw-github-repo{0} {1}', ':', github.repository) }}"
This compiles to a plain scalar that is valid YAML, but is unnecessarily complex for what is a straightforward string value.
Environment
gh aw compiler version: v0.77.5
🤖 This issue has been opened by Claude Code.
Summary
When an
engine.envvalue contains a colon-space sequence (:), the gh-aw compiler emits it as an unquoted YAML plain scalar in the lock file. YAML parsers then misinterpret the:as a nested mapping entry, causing a parse error.Steps to reproduce
Add an env var whose value contains
:toengine.envin a workflow frontmatter:Run
gh aw compile. The generated lock file contains:This is invalid YAML — the
:afterx-aw-gw-github-repois parsed as a mapping separator.Error
Expected behaviour
The compiler should detect that the value requires quoting and emit it as a quoted scalar:
Workaround
Use a
format()expression to avoid the literal:in the compiled YAML:This compiles to a plain scalar that is valid YAML, but is unnecessarily complex for what is a straightforward string value.
Environment
gh awcompiler version: v0.77.5