-
Hi, I want to run some tasks after Is that possible? This works for me, but I would like it to run only when I install a specific extra.
Thanks a bunch |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hi @drjct, Making a poetry task hook depend on the arguments to the poetry task is not supported today. If you think this is important (and you're willing to help) then we could look into enhancing the poetry plugin to enable this. There's probably a way for the plugin to know what arguments we passed to the An alternative approach would be perhaps to expose the poetry arguments to the hook task, either by forwarding them directly or setting an env var. Would that work for your use case? I imagine something like: [tool.poe.poetry_hooks]
post_install = "task-name ${POETRY_ARGS}" |
Beta Was this translation helpful? Give feedback.
hi @drjct,
Making a poetry task hook depend on the arguments to the poetry task is not supported today.
If you think this is important (and you're willing to help) then we could look into enhancing the poetry plugin to enable this. There's probably a way for the plugin to know what arguments we passed to the
poetry install
command (TBC), but then how to configure the hook to depend on this is a bit of a trickier question. Off the top of my head I can't think of an elegant solution.An alternative approach would be perhaps to expose the poetry arguments to the hook task, either by forwarding them directly or setting an env var. Would that work for your use case?
I imagine something like:
[t…