fix(runner): propagate exit code from rtk err and rtk test#860
fix(runner): propagate exit code from rtk err and rtk test#860qte77 wants to merge 1 commit intortk-ai:developfrom
Conversation
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>
|
|
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit 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 |
|
Thanks for the heads up! Will rebase on develop after #826 lands. The change is a 6-line addition in |
Fixes #846
Summary
run_err()andrun_test()insrc/runner.rscapturedexit_codebut always returnedOk(())— callersand the shell always saw exit 0
timer.track(), callstd::process::exit(exit_code)whenexit_code != 0to propagate the childprocess exit status
Test plan
rtk err falsenow returns exit 1 (was 0)rtk err truestill returns exit 0rtk test 'cargo test'propagates test failurescargo fmt --all && cargo clippy --all-targets && cargo testdevelopafter feat(refacto-codebase-onboarding): partie 1 - folders and technical docs #826 refactor