Refactor to capture exit_status for successful runs #272
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The submission script would incorrectly report a workflow error even when it finished successfully. This was due to the inline
exit_status
assignment logic, which only captured unsuccessful runs, leaving theexit_status
variable unassigned for successful runs. This resulted in an "unbound variable" error message in the logs. To address this issue, we moved theexit_status
assignment to the next line (not inline) to ensure that the variable is properly assigned even for successful runs (exit code 0) of the snakemake command. This change resolves the issue and ensures accurate reporting of workflow status.Fixes #262