libgit2 / libgit2/libgit2sharp.nativebinaries

Trying to build without CMake installed gives a confusing error message

未關閉
#58 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
PowerShell
星號
35
分支
74
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從第 71 行的 build.libgit2.ps1 開始,在 cmake.exe 無法使用時重現建置流程。檢查如何處理 Get-Command cmake.exe 的空結果,然後在沒有 CMake 的情況下執行指令碼,以確認它回報的是清楚且可採取行動的錯誤,而不是 IndexOutOfRangeException。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cmake, powershell
領域
build-system
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
58/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。