Repository navigation
fix(): let PowerShell run gitrid when it finds the Git Bash command first - #19
Merged
Merged
Conversation
…irst A PowerShell with ~/bin on its PATH (one started from Git Bash, say) finds ~/bin/gitrid before the gitrid.ps1 of the PowerShell setup. It can not run a file with no extension, so gitrid did nothing and printed nothing. setup_gitbash.sh now writes ~/bin/gitrid.ps1 next to the wrapper, which PowerShell runs in its place. It runs the same script with Git's bin\bash.exe. The tests run on Windows too, and .gitattributes keeps the shell scripts and tests on LF line endings there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The checkout the workflow tests run in has no main branch, so gitrid stopped with exit code 1 before it looked at the pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
3.1.1 made
gitrida command in Git Bash by writing a wrapper to~/bin/gitrid. A PowerShell that has~/binon its PATH (one started from Git Bash, or by a tool that passes on the Git Bash PATH) finds that file before thegitrid.ps1of the PowerShell setup. PowerShell can not run a file with no extension, sogitriddid nothing and printed nothing.A PowerShell window opened in the usual way does not have
~/binon its PATH and was not affected.What changed
setup_gitbash.shwrites~/bin/gitrid.ps1next to the wrapper. Where a folder holds both, PowerShell runs the.ps1. It runs~/Scripts/gitrid.shwith Git'sbin\bash.exe, named in full: a plainbashin PowerShell can be the one of WSL, andusr\bin\bash.exedoes not putgrepand the rest on the PATH.cygpathis found).README.mdandllms.txtsay so.Tests
tests/setup.bats: the.ps1is written on Windows only; PowerShell with~/binon its PATH runs the installed script; a pattern with^,|and$arrives as typed and the exit code comes back.windows-latest, in Git Bash. This is its first run there..gitattributeskeeps*.shand*.batson LF, which the Windows runner needs and which also covers a clone made withcore.autocrlf=true..ps1too.🤖 Generated with Claude Code