Skip to content

Comment out profiles with templates #209

Answered by jkellerer
http403 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @http403,

Templates don't follow TOML or YAML markup (the are one level above).
Try: {{ /* template "hook_discord" . */ }} to disable a template call.

You can also do the following:

{{ if .Env.DEBUG }}{{ template "hook_discord" . }}{{ end }}

And then set DEBUG to conditionally enable the hook:

DEBUG=1 resticprofile ...

(You can also place the if conditions inside your defines and leave the template calls as they are)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@http403
Comment options

Answer selected by http403
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants