Skip to content

fix(runner): propagate exit code from rtk err and rtk test#860

Open
qte77 wants to merge 1 commit intortk-ai:developfrom
qte77:fix/err-exit-code
Open

fix(runner): propagate exit code from rtk err and rtk test#860
qte77 wants to merge 1 commit intortk-ai:developfrom
qte77:fix/err-exit-code

Conversation

@qte77
Copy link
Copy Markdown

@qte77 qte77 commented Mar 26, 2026

Fixes #846

Summary

  • run_err() and run_test() in src/runner.rs captured exit_code but always returned Ok(()) — callers
    and the shell always saw exit 0
  • After timer.track(), call std::process::exit(exit_code) when exit_code != 0 to propagate the child
    process exit status

Test plan

Important: All PRs must target the develop branch (not master).

Both run_err() and run_test() captured exit_code but always returned
Ok(()) — callers and the shell always saw exit 0. After timer.track(),
call std::process::exit(exit_code) when exit_code \!= 0 to propagate
the child process exit status.

Co-Authored-By: Claude <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

@qte77 qte77 changed the title fix(runner): propagate exit code from rtk err and rtk test (#846) fix(runner): propagate exit code from rtk err and rtk test Mar 27, 2026
@qte77
Copy link
Copy Markdown
Author

qte77 commented Mar 27, 2026

Thanks for the heads up! Will rebase on develop after #826 lands. The change is a 6-line addition in src/runner.rs — should be a clean rebase regardless of the path restructure.

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.

4 participants