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.
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.