gruntwork-io / boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
https://www.gruntwork.io
Mozilla Public License 2.0
160 stars 12 forks source link

Configure `--missing-key-action` on a per-variable basis. #12

Open josh-padnick opened 7 years ago

josh-padnick commented 7 years ago

Boilerplate currently supports the --missing-key-action property when using boilerplate on the command line.

The problem is that I want certain values to render blank, while other values that are accidentally blank (or otherwise invalid) to throw an error. But boilerplate makes me choose just one --missing-key-action approach for the entire template generation.

brikis98 commented 7 years ago

Distinguishing between an empty string and a missing value is a known TODO. A potential workaround for now is to use some sort of placeholder value (e.g. __EMPTY__) to indicate you want an empty string.