Skip to content

Document exit logic in task wrapper script#7290

Merged
bentsherman merged 2 commits into
masterfrom
5556-docs-bash-unstage-logic
Jul 23, 2026
Merged

Document exit logic in task wrapper script#7290
bentsherman merged 2 commits into
masterfrom
5556-docs-bash-unstage-logic

Conversation

@bentsherman

Copy link
Copy Markdown
Member

Close #5556

Runtime behavior is unchanged since comments are stripped from the rendered wrapper script

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs canceled.

Name Link
🔨 Latest commit 6d90c92
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs/deploys/6a6249b37d07b60009c00540

@pditommaso pditommaso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — verified the comments against the actual bash and the rendering path:

  • BashTemplateEngine strips all ## -prefixed lines, so the rendered wrapper is unchanged. ✓
  • on_exit precedence, the 0-of-last-command note, and the set -e/set -u fallback path all match the code. ✓
  • nxf_unstage conditional (outputs only when nxf_main_ret==0, controls unconditional) is accurate. ✓

Nice-to-have (non-blocking): the nxf_unstage_controls comment says its exit status "becomes the generic last_err fallback in on_exit", but that only holds when no after script is defined — with {{after_script}} present, it runs after nxf_unstage, so $? reflects the after script and a controls failure is lost rather than surfaced as last_err. Could tighten to "…unless an after script runs later."

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman
bentsherman force-pushed the 5556-docs-bash-unstage-logic branch 3 times, most recently from 1d1f929 to 5c1d175 Compare July 23, 2026 16:24
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman
bentsherman merged commit b61eda2 into master Jul 23, 2026
23 checks passed
@bentsherman
bentsherman deleted the 5556-docs-bash-unstage-logic branch July 23, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docs and rationale about exit logic in Bash unstage function

2 participants