13.13 Script Exit Codes

Go To Top

Return to Build and Run Scripts

Scripts should use meaningful exit codes so that developers, testers, CI runners, and demonstration operators can distinguish success from failure.

The basic convention should be:

  1. 0 for success.
  2. Non-zero for failure.

The team may define additional exit-code categories if scripts or CI workflows need more detail. For example, the team may distinguish:

  1. Missing prerequisites.
  2. Invalid arguments.
  3. Configuration failure.
  4. Generation failure.
  5. Build failure.
  6. Runtime failure.
  7. Validation failure.
  8. Unexpected internal script failure.

When a script returns non-zero, it should print a clear message explaining what failed and what the user should check next. A script should not return success if required work failed.

Exit-code conventions should appear in script headers, script help text, and the Script Reference appendix.


© 2026 Dido Solutions, Inc. and Jackrabbit Consulting, Inc.

  • fxdemo/05-part/13-build-and-run-scripts/13-13-script-exit-codes/start.txt
  • Last modified: 2026/08/10 15:09
  • by owen