Closed XF-FW closed 2 years ago
Changing https://github.com/nat-n/poethepoet/blob/e9cabc322191982aaa8a1d5f6f8d0581d0027666/poethepoet/task/script.py#L57 should be sufficient
Sounds about right and I wouldn't mind contributing with a PR, but I'm not sure on how I should handle the configuration.
The title of this issue is “implicit print” so maybe you would like it to print the return value if the return value is not None
how I should handle the configuration.
I believe it’s self.options
? Not too sure but you should try that
Hi @XF-FW, thanks for the feedback.
I see how that would be useful. I would accept a PR to enable something along the lines of:
[tool.poe.tasks]
get_random_secret_key = { script = "django.core.management.utils:get_random_secret_key()", print_result = true }
Check the contributing guide. You'll need to register an option for the script task type (see how it's done for the sequence task type) and a test case here.
I've implemented this feature on the development branch and it will be included in the next release.
Hello there,
I'm trying to add something like this:
The function however, returns a string and does not print its result. Would it be possible to have an option to print the return values of a given function?
Thank you.