-
-
Notifications
You must be signed in to change notification settings - Fork 213
Gomplate produce output file when parsing fails #578
Copy link
Copy link
Open
Description
Subject of the issue
gomplate using an input template with reference to an environment variable that doesn't exist, still writes an output file.
Your environment
- gomplate version 3.5.0
Steps to reproduce
$ gomplate -i 'fail: {{ .Env.BOGUS }}' -o fail.yml
template: <arg>:1:13: executing "<arg>" at <.Env.BOGUS>: map has no entry for key "BOGUS"
Expected behaviour
$ stat -f "%N" fail.yml
stat: fail.yml: stat: No such file or directory
$ test -f fail.yml || echo $?
1
Actual behaviour
$ stat -f "%N" fail.yml
fail.yml
$ test -f fail.yml && echo $?
0
Reactions are currently unavailable