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

Specifying templates in the .gomplate.yaml causes no output to be rendered #2002

Open
stouset opened this issue Feb 21, 2024 · 6 comments
Open

Comments

@stouset
Copy link

stouset commented Feb 21, 2024

❯ gomplate --version
gomplate version 3.11.7

❯ cat .gomplate.yaml
templates:
  foo.t:
    url: file://foo.t

❯ cat foo.t
abc

❯ cat bar.t 
{{ template "foo.t" }}

❯ gomplate --verbose < bar.t 

❯ rm .gomplate.yaml
❯ gomplate --verbose --template foo.t < bar.t
21:25:57 DBG starting gomplate
21:25:57 DBG config is:
---
templates:
  foo.t:
    url: file:///var/folders/_m/hjhtwf1s75d3cwc3c0rc08jc0000gn/T/tmp.dj1fS1HM1E/foo.t
 build= version=3.11.7
abc
@stouset
Copy link
Author

stouset commented Feb 21, 2024

This causes an early-exit (with exit status zero) before any logging is even output. It seems to be a parser failure of the .gomplate.yaml, but I have even attempted to use the literal output from the printed DBG config and the same issue occurs.

@NiceGuyIT
Copy link

I ran into the same problem and the pre-release version 4.0.0-pre-2 worked for me.

@hairyhenderson
Copy link
Owner

thanks for the followup @NiceGuyIT! @stouset is using 4.0.0-pre-2 an option for you?

@hairyhenderson
Copy link
Owner

hairyhenderson commented Mar 20, 2024

One issue with your original config is file://foo.t is not a valid absolute file URL - file URLs must have file:/// as a prefix (three / characters). That may or may not be the cause, but it's a potential factor...

@stouset
Copy link
Author

stouset commented Mar 20, 2024

I tried that as well with no luck.

Copy link

This issue is stale because it has been open for 60 days with no
activity. If it is no longer relevant or necessary, please close it.
Given no action, it will be closed in 14 days.

If it's still relevant, one of the following will remove the stale
marking:

  • A maintainer can add this issue to a milestone to indicate that
    it's been accepted and will be worked on
  • A maintainer can remove the stale label
  • Anyone can post an update or other comment

@github-actions github-actions bot added the Stale label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants