freckle / stackctl

Manage CloudFormation Stacks through specifications
MIT License
14 stars 1 forks source link

Respect LOG_COLOR #36

Closed pbrisbin closed 1 year ago

pbrisbin commented 1 year ago

Within Stackctl, the --color option was always present with a (possibly default) value, and always applied to the LogSettings for Blammo. This meant that LOG_COLOR was not being respected.

This is a problem for our desired CI setup, where we'd like to establish configuration through environment variables in a single step, to impact later calls to stackctl (or through platform).

By moving the option to a Maybe, and only applying it when present, we will ensure LOG_COLOR is respected. This simplified a lot generally too, which is nice. It's also following the same pattern as other ENV-or-option settings.

The only downside is that of the pattern overall, we can't use value in the options parser, so --help won't display defaults. This is acceptable because we document in the man-pages anyway.