Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gotemplate produces an empty file on Github Action runners #172

Open
chrisgoffinet opened this issue Jan 16, 2022 · 0 comments
Open

gotemplate produces an empty file on Github Action runners #172

chrisgoffinet opened this issue Jan 16, 2022 · 0 comments

Comments

@chrisgoffinet
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant