go-template-cli icon indicating copy to clipboard operation
go-template-cli copied to clipboard

Include silently fails

Open mlabbe opened this issue 1 year ago • 2 comments

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 avatar May 06 '24 17:05 mlabbe

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!

mlabbe avatar May 06 '24 21:05 mlabbe

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

bluebrown avatar May 11 '24 22:05 bluebrown

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.

mlabbe avatar Jun 01 '24 17:06 mlabbe