libgit2 / libgit2/libgit2sharp.nativebinaries

Trying to build without CMake installed gives a confusing error message

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.