How it works
- Pick the Run PowerShell, Run command or Run JavaScript step to check.
- Check that it succeeded, that its exit code is a given number, that its output is or contains some text, or that it matches a pattern.
- Text checks ignore upper and lower case and the final line break.
- It only reads the step's saved outputs and runs nothing itself; a step that hasn't run yet simply counts as not matched.
Routines that use it
Only notify on failure
After Run command runs a backup tool, Script result checks the exit code and Show banner warns you only when it isn't 0.
Git branch check
Run command calls git to print the current branch, and if the output is main, Ask Yes or No confirms before continuing.
Server status
Run PowerShell tests a service; if the output contains Stopped, Send webhook alerts your Discord channel.
Settings
| Setting | What it does |
|---|---|
| Step | The script step to check (Run PowerShell, Run command or Run JavaScript). |
| Check | What to check. |
| Exit code | The exit code it should have. |
| Text | The text (for is and contains, ignoring case and the last line break), or a pattern (regular expression). |
Good to know
- It checks script steps only; for other steps use Step succeeded or Compare values.
Questions
- How do I check a script's exit code in a routine?
- Add Script result after the script step, choose 'exit code is' and enter the number. Use it in an If to run different steps for each outcome.
- What if the script step was skipped?
- A step that hasn't run counts as not matched rather than an error, so the routine keeps going down the 'no' branch.