Repository navigation
test(find): resolve exit-status oracle through PATH - #4612
rotirotirafa wants to merge 1 commit into
Conversation
📊 Automated PR Analysis
SummaryFixes a flaky Windows-only test that could compare RTK's exit code against the wrong 'find' executable (System32 vs Git's GNU find) by using the project's shared resolved_command('find') helper instead of a bare Command::new. Only test code changes; no runtime behavior is affected. Review Checklist
Linked issues: #4610 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
Verified on Windows, where #4610 was reported: Windows 11,
So |
Thanks for verifying this on Windows and confirming the before/after behavior! This covers the Windows GNU validation I couldn't run locally. |
Summary
On Windows,
run_from_args_propagates_find_exit_statuscan compare RTK's exit code with that of a different program: bareCommand::new("find")can select System32's text-search utility while RTK's PATH resolver selects Git's GNU find. The test then fails with 1 versus 2 even though RTK propagates the child's status correctly.Use
crate::core::utils::resolved_command("find")for the test's reference invocation, matching the lookup already used byrun_compress. Keep the exit-code assertion and existing fallback unchanged, and add a short comment explaining why the shared resolver matters. Only the existing test changes; runtime behavior is unchanged.Fixes #4610.
Test plan
cargo fmt --all --checkcargo fmt --manifest-path proxy/Cargo.toml --all --checkcargo clippy --locked --all-targetscargo test --locked --all— 4,953 passed, 0 failed, 8 ignored.git diff --checkValidation was on macOS arm64 with Rust 1.99.1. The Windows System32/Git executable collision reported in #4610 was not reproduced locally; Windows GNU/MSVC execution remains unverified. No new test is added because this repairs the executable lookup in the existing exit-status regression test.