https://prefect.io logo
Title
p

Philip MacMenamin

03/17/2022, 7:58 PM
Hi, what's the typical way you would run a ShellTask with an argument that's used in the
command
which is a return from a prev Task? eg
with Flow(name='t') as f:
   a = task_a()
   b = shell_task(a)
k

Kevin Kho

03/17/2022, 7:59 PM
That should work and if you get an error you can be explicit
b = shell_task(command=a)
p

Philip MacMenamin

03/17/2022, 8:00 PM
let's say I want :
b = shell_tast(command=f"ls {<http://a.as|a.as>_posix()}")
k

Kevin Kho

03/17/2022, 8:05 PM
The whole
f"ls {<http://a.as|a.as>_posix()}"
needs to be an output of a task
p

Philip MacMenamin

03/17/2022, 8:06 PM
ahh, ok. Got it. That's the trick I was missing.