Files
mixer-tools/mixer
Patrick McCarty 0cf05bafc7 Fix setting of log location with custom config
When mixer's -c/--config option was used, the referenced config was read
too late to set a default log location. As a result, the log location
was always set to the empty string (disabling logging), that is, unless
--log VALUE was specified, or if mixer's current working directory
contained a builder.conf with LOG defined.

The root cause of this bug is an order-of-operations issue with cobra
integration; fix the issue by setting the log location in
PersistentPreRunE() instead of init(), ensuring that the command line
arguments have been processed, with `configFile` being set to the
-c/--config value if specified.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2022-08-26 16:04:05 -07:00
..
2018-07-26 10:45:41 -07:00