Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetGitPath(): Fix path to git on MS-Windows. #275

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

aforren1
Copy link
Contributor

'where git' returns the path including 'git.exe', and GetGITInfo() only expects the path minus the executable. This chops the 'git.exe' off.

Successfully tested on Win11 + git from https://www.git-scm.com/. Originally, it would fail at the git describe step because the concatenated command was '"C:\Program Files\Git\cmd\git.exe"git'.

Unrelated, but any reason the Mac/Linux branch of GetGITInfo() couldn't be replaced with which git instead of checking predefined paths?

'where git' returns the path including 'git.exe', and GetGITInfo()
only expects the path minus the executable. This chops the 'git.exe'
off.
@kleinerm kleinerm merged commit 704652d into kleinerm:master Jun 11, 2024
1 check passed
@kleinerm
Copy link
Owner

Thanks. Wrt. Mac/Linux. I don't know. Was written by the Brainard lab, and probably only tested on macOS at that time.
Possibly would just work, but would need testing. I guess this function is rarely used so far, certainly by myself, so bugs
can go undiscovered for long.

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.

2 participants