Open tchiotludo opened 4 years ago
I have a similar request - it would be nice to override or add an environment with an option. Again there's a problem with the order of initializing the context!
e.g. I could run
mycmd --environment production ...
It will be very nice to have the possibility to declare a new option on picocli micronaut that will be used a new PropertySource (maybe with Custom Type Converters), like that :
The file will be added as a
PropertySource
and will override the default one. I think it's a standard behavior of a some cli app to have a configuration file option in order to avoid the lot of--optA A --optB B --optC C
As I see, for now, there is no workaround to allow this kind of options (or need to parse the args like on https://github.com/micronaut-projects/micronaut-picocli/issues/20). And as i see the PropertySource can't be added after the init of
ApplicationContext
(no way to add some configuration during runtime).