From 28aa303641f8d180ce82d1386c6e2580a4b7ca78 Mon Sep 17 00:00:00 2001 From: Alex Domingo Date: Thu, 19 Sep 2024 01:01:47 +0200 Subject: [PATCH] add granular exit codes to the enhacements of easybuild v5 --- docs/easybuild-v5/enhancements.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/easybuild-v5/enhancements.md b/docs/easybuild-v5/enhancements.md index 33b3543dd..4078d963d 100644 --- a/docs/easybuild-v5/enhancements.md +++ b/docs/easybuild-v5/enhancements.md @@ -5,6 +5,7 @@ Various significant enhancements are included in EasyBuild v5.0, including: * [`run_shell_cmd` function][run_shell_cmd] +* [Granular exit codes][granular_exit_codes] --- @@ -12,3 +13,15 @@ Various significant enhancements are included in EasyBuild v5.0, including: See dedicated page on the new [`run_shell_cmd` function](run_shell_cmd.md). +## Granular exit codes { : #granular_exit_codes } + +EasyBuild v5 now uses a range of ~50 exit codes instead of just 0 for normal +termination and 1 for unexpected termination. Each non-zero exit code +correlates to the specific type of error or failure that caused the +termination of the program. For instance, a missing easyconfig or a failed +checksum check. The full list of exit codes is defined in the class +[easybuild.tools.build_log.EasyBuildExit](https://github.com/easybuilders/easybuild-framework/blob/main/easybuild/tools/build_log.py#L74). + +EasyBuild will always return its own exit codes on termination. Other exit +codes from external processes executed through `run_shell_cmd` or HTTP response +status codes are reported in the corresponding logs.