mendix / m2ee-tools

m2ee, the Mendix runtime helper tools for GNU/Linux
Other
27 stars 40 forks source link

m2ee 7.2 won't start when custom configuration option '-c' is used and default ~/.m2ee/m2ee.yaml is missing #40

Closed dlhartveld closed 5 years ago

dlhartveld commented 5 years ago

Typical m2ee -c m2ee.yaml output when you don't also have a ~/.m2ee/m2ee.yaml file:

WARNING: Error reading configuration file ['[...non-default path...]/m2ee.yaml']: coercing to Unicode: need string or buffer, list found, ignoring...
CRITICAL: No configuration present. Please put a m2ee.yaml configuration file at the default location ~/.m2ee/m2ee.yaml or specify an alternate configuration file using the -c option.

I verified 7.1 does work.

knorrie commented 5 years ago

Yes, this is a regression, after replacing optparse with argparse, which now gives a nested list back.

I just put a fix in the develop branch.

If you specify -c, the default config file is not added to the list of files to be read, that's why it ends up with the critical. Having something in the default location or not does not matter in this case.

Thanks for reporting. This needs a new release, since there's no workaround.