<#3667 [BUG] ShellTasks return promises when calle...
# flyte-github
a
#3667 [BUG] ShellTasks return promises when called inside a task Issue created by brian-odonovan Unsure if this is a bug but the expected behavior and functionality feels counterintuitive. If I write a simple ShellTask the produces a FLyteFile I am unable to invoke that ShellTask in a task and do any computation or even return the FlyteFile given that it is a promise:
Copy code
from flytekit import kwtypes, task
from flytekit.extras.tasks.shell import OutputLocation, ShellTask
from flytekit.types.file import FlyteFile


st = ShellTask(
    name="shell_task",
    debug=True,
    script="""
    touch {inputs.filename}
    """,
    inputs=kwtypes(filename=str),
    output_locs=[OutputLocation(var="outfile", var_type=FlyteFile, location="{inputs.filename}")],
)


@task 
def t1_task( ) -> FlyteFile:
    outfile = st(filename='test.txt')

    return outfile


if __name__ == "__main__":
   
    print(f"let's run a shelltask and return a FlyteFile")
    outfile = t1_task()
flyteorg/flyte