-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
"unexpected {{end}}" error that only happens when using --input-dir #238
Comments
Thanks for reporting this, @jcelliott! This is a super weird bug, for sure. I haven't been able to reproduce it yet: $ gomplate -f templates/template.txt -d config=config.toml
hello, asdf
$ gomplate --input-dir templates --output-dir out -d config=config.toml
$ cat out/template.txt
hello, asdf
I'll fiddle around and see if I can reproduce... |
Nope, still haven't been able to reproduce at all. Can you confirm that |
Yeah, I just double checked. The template is exactly the same. I tried latest gomplate with |
I just figured it out 😆 . It consistently failed while I had the template open in vim. When I closed it everything worked as expected. It was trying to template the It looks like there's an This also makes me think it would be nice to have the specific file where a failure occurred in the error message. That would have made it very obvious what the problem was. Thanks for looking into this. |
😆 Good find! Glad you solved this 🙂 I'm not so sure about excluding hidden files by default - the use-case of using However, I definitely agree that the error should have been more clear! I'll log an issue for that and see if I can work on it. I'm on vacation in Africa right now (which is why it's taken so long for me to respond!) but I have a semi-reliable internet connection and a computer with more-or-less the right dev tools, so I'll take a stab at it 😉 |
@jcelliott I've just merged #240 which puts the filename in the error message - should stop head-scratchers like this in the future 😉 |
Given the following template and datasource:
template.txt
config.toml
Calling gomplate like this works as expected:
But calling it like this results in an error:
I've looked (quickly) through the code and can't see any reason why this would be happening, it looks like it's mostly the same code path.
The text was updated successfully, but these errors were encountered: