Hello, I'm currently using the ShellTask with a pi...
# ask-community
w
Hello, I'm currently using the ShellTask with a piped command and it seems like prefect is only checking the exit status of the last command, i.e. if I run
foo | bar
it will only check the exit status of
bar
any ideas on how to make prefect raise an error if either tasks fails?
k
Hey @Will Milner, I’ll definitely need to dive deeper on piped shell commands using the ShellTask. For the time being you can certainly use multiple ShellTasks to gain the monitorability of each command, but this isn’t ideal of course so I’ll need to get more information.
w
one possible solution I found was to use the
helper_script
with
set -o pipefail
🤔 1
k
That’s awesome! Not only a great solution, but I think something that can be a native configuration of the ShellTask so I’m going to pass this forward to the team.