bluebrown / go-template-cli

render json, yaml & toml with go templates, from the command line
BSD Zero Clause License
30 stars 6 forks source link

Include silently fails #17

Closed mlabbe closed 3 months ago

mlabbe commented 4 months ago

I am using {{ include "some bad file.tmpl" . }} in a template, and when the file doesn't exist, it just silently adds nothing. I would love an option or a default where missing files immediately halt processing and generate an error.

Thank you for your time

mlabbe commented 4 months ago

Hey, here are a couple pull requests that solve the issue:

https://github.com/bluebrown/go-template-cli/pull/18 https://github.com/bluebrown/treasure-map/pull/1

Thanks for the helpful tool!

bluebrown commented 4 months ago

Hi, would you mind rebasing your PRs so they only change what is necessary?

mlabbe commented 3 months ago

Sorry - I am not going to have the dev time to spare rebase them in both of your repos. The cherry pick approach should work.