Skip to content

Commit 1fe8c9b

Browse files
committed
Explain that execution will fail if overriding executable exits with status code different from 0
1 parent 3e555cb commit 1fe8c9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ TASK_INPUT=$1 # First argument is the input to the overridden Task state
259259
echo "$TASK_INPUT" | jq '.num1 + .num2' # Use jq to add "num1" and "num2", and print result to stdout
260260
```
261261

262-
When overriding a `Task` state, the overriding script/program will be passed the input to the `Task` state as first argument, which can then be used to compute the task result. Similarly, the overriding script/program must print the task result as a JSON value to the standard output, so `local-sfn` can then read stdout and use the value as the result of the `Task` state.
262+
When overriding a `Task` state, the overriding executable will be passed the input to the `Task` state as first argument, which can then be used to compute the task result. Similarly, the executable must print the task result as a JSON value to the standard output, so `local-sfn` can then read stdout and use the value as the result of the `Task` state. If the executable terminates with an exit code different from `0`, its standard error will be printed and the execution will be marked as a failure.
263263

264264
Additionally, you can pass the `-t, --override-task` option multiple times, to override more than one `Task` state. For example:
265265

0 commit comments

Comments
 (0)