Skip to content

gotemplate produces an empty file on Github Action runners #172

Open
@chrisgoffinet

Description

So this took me forever to figure out because I couldn't reproduce this issue anywhere on three different platforms (local environment on macOS, remote Linux machine x86, and through docker container). But the bug I ran into was this on a Github Action runner:

gotemplate run -P > README.md

I even used the gotemplate run -L 5 --debug-log-level=9 flags with no meaning output on the runners. I did notice on my machines i would see the log lines: (on local not github)

NOTICE   Launching [/usr/bin/bash /tmp/exec_2901017835]

Which lead me to suspect something environment wise something was a miss. The working directory was set properly, I had a file in the same folder called README.md.template that i thought would read the template file ? (it did on my set of machines). But I suspect the reason why I was getting empty response was it couldn't locate the template file. The fix was passing the full path to the template file to run parameter. Maybe an improvement here is we could throw an exit code of 1, if it can't locate any template files to run. If the tool had done that, I think I could of tracked it down much quicker.

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