Skip to content

cronic: run the command with the caller's shell options, and capture all of the subshell's output - #142

Merged
mernst merged 12 commits into
plume-lib:masterfrom
mernst:cronic-subshell
Oct 11, 2026
Merged

mernst merged 12 commits into
plume-lib:masterfrom
mernst:cronic-subshell

Conversation

@mernst

@mernst mernst commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #140.

  • The command runs with the caller's -a, -e, -u, and -x options rather than with cronic's own. When the caller exports SHELLOPTS, a bash script that the command runs no longer inherits cronic's set -eu. For example, Daikon's Rocky Linux CI fails in cronic makeinfo --pdf with /usr/bin/texi2dvi: line 83: COMSPEC: unbound variable.
  • When the caller exports xtrace, cronic traces only the command, not itself, so that it does not write to stderr on every run. When the caller exports allexport, cronic does not export its own variables to the command.
  • The redirections now apply to the whole subshell, so output that the subshell writes after the command finishes (such as from an EXIT trap that the command sets) is captured rather than leaked to cron with no report.

Adds tests for each of these.

This supersedes #135.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: plume-lib/plume-scripts/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: b428ef9f-99ff-4c20-8fd5-87e761f71639

📥 Commits

Reviewing files that changed from the base of the PR and between 8d96b0a and 0170055.


📒 Files selected for processing (2)
  • cronic
  • tests/cronic-test/cronic-test.sh

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mernst mernst changed the title Capture all of cronic's subshell output, and hide cronic's state and set -u from the command cronic: run the command with the caller's shell options, and capture all of the subshell's output Oct 11, 2026
@mernst
mernst merged commit 9f780b8 into plume-lib:master Oct 11, 2026
8 checks passed
@mernst
mernst deleted the cronic-subshell branch October 11, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant