fix(cron): prefer Git Bash for Windows shell scripts - #66769
Conversation
|
Thanks for the focused Windows cron fix. Static review found no blocking issue. Current main still uses The added tests cover scheduler delegation, resolver errors, WSL launcher filtering, canonicalized aliases, and the affected subprocess-environment filtering paths. The affected files were unchanged from this checkout through the PR base, so salvage should be mechanical. Automated hermes-sweeper review. |
|
Retested against current
Ready for maintainer approval and merge. |
SummarySeven PRs are associated with this shell-resolution complex: #42219, #42290, #53106, and #53110 address the macOS background-command swallow; #41456 and #66769 address distinct Windows WSL-versus-Git-Bash selection paths; and #53166 bundles broader Windows compatibility work while referencing the same shell area. The macOS issue was resolved by merged #53110, while the two open Windows PRs retain separate focused scopes. Related pull requests
Duplicates#42219 and #53106 are substantially the same Suggested consolidationKeep #66769 open with a salvage path: retain the native-Windows cron delegation to Cross-PR triage: Reviewed 7 pull requests and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 125 kB of PR diffs, 22 kB of issue/PR text, 10 kB of discussion (19 comments), 6 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Summary
.sh/.bashjobsbash.exelauncher atSystem32,Sysnative, andSysWOW64, including canonicalized symlink, junction, 8.3, and UNC aliases_HERMES_FORCE_inputs)Root cause
On native Windows, the gateway PATH can resolve
bashtoC:\Windows\System32\bash.exebefore Git for Windows. That launcher enters WSL and cannot consume the native/MSYS script path passed by cron, producing exit 127 and a mangled path such asC:Users....The first repair exposed two adjacent hardening gaps during fail-closed review: resolver probes inherited the gateway environment, and resolver
RuntimeErrordetails were discarded. A follow-up review also identified alias-based WSL selection and a Tier-1 blocklist drift case. This PR now closes all four paths.Verification
c48d53413(POSIX/macOS path-separator, HOME-expansion, and mode-bit assumptions)ruffon all five changed files: passedcompileall: passedgit diff --check: passedC:\Program Files\Git\bin\bash.exe; all three Windows WSL launcher paths classify as rejected in strict modebushel-source-freshness-mwfcompleted successfully through its.shscript