-
I am trying to use POE to add an optional step to install MariaDB C Connector for linux/ubuntu and mac. What is the canonical way to basically write conditional statements in POE based on the underlying OS? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Interesting question. Poe doesn't currently have any functionality specifically to support performing different actions depending on the host OS. I'd suggest using a shell task with a pattern along the lines of that demonstrated here: https://stackoverflow.com/questions/394230/how-to-detect-the-os-from-a-bash-script Or you could do something similar with a python script task, though this will probably be less convenient. The plan is to implement conditional tasks #12 which would support this by allowing you to define a task that only runs if another task that checks for a specific OS returns 0. Though the design I have in mind for this feature is only really intended for skipping redundant tasks so would be a bit tedious to use if you wanted control flow with multiple branches. |
Beta Was this translation helpful? Give feedback.
-
As of v0.17.0 you can use a switch task to run different versions of a task depending on the |
Beta Was this translation helpful? Give feedback.
Interesting question. Poe doesn't currently have any functionality specifically to support performing different actions depending on the host OS.
I'd suggest using a shell task with a pattern along the lines of that demonstrated here: https://stackoverflow.com/questions/394230/how-to-detect-the-os-from-a-bash-script
Or you could do something similar with a python script task, though this will probably be less convenient.
The plan is to implement conditional tasks #12 which would support this by allowing you to define a task that only runs if another task that checks for a specific OS returns 0. Though the design I have in mind for this feature is only really intended for skipping redundan…