Closed sobakasu closed 8 years ago
after further investigation, it looks like {{~else}}
doesn't work.
i'm using hab 0.10.2/20160930230245
it should be {{else}}
(found correct usage in the kibana
plan)
The documentation does not mention the else clause syntax
@sobakasu thanks for finding this one! As you mentioned, {{else}}
is the correct directive. We use Handlebars and anything our documentation doesn't cover you can find there. We'll get this fixed up.
In the ruby-rails-sample plan, there is a section in config/database.yml that looks like this:
This differs from the documentation on runtime binding at https://www.habitat.sh/docs/run-packages-binding/, which looks like this:
(one uses
~#if bind.has_database
, the other#if bind.database
in the #if clause, and one has ~#each and the other has #with)Also, i'm not sure about this but I have tried
{{~#if bind.has_database}}
, and{{~#if bind.database}}
, but my service does not include host: and port: lines in database.yml. So the else clause is not evaluating when I have no bindings set up