Reputation: 822
I'm using the Invoke python command runner and I'm having a bit of trouble making some modifications to the Config object (which loads and exposes user created options).
By default, Invoke will load a user profile with a prefix of ~/.invoke
(so it loads the file ~/.invoke.yaml
for example). The Config class, however, has an option to change this prefix to anything using the user_prefix
option.
Unfortunately, there are no clear instructions as to where the config object has to be constructed and then used in the program?
I know that internally the config class in instantiated, the options are merged and exposed via the context
variable within tasks, but where can I specify to use a different prefix for the user config file?
The Program
class allows you to specify a config class in and of itself, but it will internally instantiate it with no option to set the user_prefix
.
Thanks.
Upvotes: 1
Views: 232
Reputation: 822
This is acutally a known issue in the current version of Invoke (0.14) and the devs are working on a fix
https://github.com/pyinvoke/invoke/issues/418
it will allow users to define a specific config file name if needed.
Upvotes: 1