libgit2 / libgit2/libgit2sharp.nativebinaries
Trying to build without CMake installed gives a confusing error message
Open
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 35
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Namely
.\build.libgit2.ps1 14
Index was outside the bounds of the array.
At C:\source\github.com\libgit2sharp\libgit2sharp.nativebinaries\build.libgit2.ps1:71 char:16
+ $cmake = @(Get-Command cmake.exe)[0] 2>$null
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], IndexOutOfRangeException
+ FullyQualifiedErrorId : System.IndexOutOfRangeException
which seems to come from @(Get-Command cmake.exe) returning an empty array.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build.libgit2.ps1 at line 71 and reproduce the build when cmake.exe is unavailable. Check how the empty result from Get-Command cmake.exe is handled, then run the script without CMake to verify it reports a clear, actionable error instead of an IndexOutOfRangeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, powershell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100