nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.4k stars 58 forks source link

Can't use os.path.isdir in case #134

Closed mgzenitech closed 1 year ago

mgzenitech commented 1 year ago
[tool.poe.tasks.post_install]
control.script = "os.path:isdir('.venv/node')"

[[tool.poe.tasks.post_install.switch]]
case = "False"
sequence = [
  ...
]

[tool.poe.poetry_hooks]
post_install = "post_install"

Is always getting me: Error: Control value '' did not match any cases in switch task 'post_install'. Cancelling command due to failed hook task

mgzenitech commented 1 year ago

Any ideas on how to check for existing directory with script?