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.
Within Stackctl, the
--color
option was always present with a (possibly default) value, and always applied to theLogSettings
for Blammo. This meant thatLOG_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 throughplatform
).By moving the option to a
Maybe
, and only applying it when present, we will ensureLOG_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.