我有一个自动化测试,它试图通过使用以下异步 Nim 过程从本地 Git 存储库中克隆一堆特定的修订。
proc cloneSpecificRevision(downloadMethod: DownloadMethod,
url, downloadDir: string,
vcsRevision: Sha1Hash) {.async.} =
assert vcsRevision != notSetSha1Hash
display("Cloning", "revision: " & $vcsRevision, priority = MediumPriority)
case downloadMethod
of DownloadMethod.git:
let downloadDir = downloadDir.quoteShell
createDir(downloadDir)
discard await tryDoCmdExAsync("git", @["-C", downloadDir, "init"])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "remote", "add", "origin", url])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "fetch", "--depth", "1", "origin", $vcsRevision])
discard await tryDoCmdExAsync("git",
@["-C", downloadDir, "reset", "--hard", "FETCH_HEAD"])
of DownloadMethod.hg:
discard await tryDoCmdExAsync("hg", @["clone", url, "-r", $vcsRevision])
结果是
Downloading /tmp/tlockfile/origins/dep1 using git
Cloning revision: 8b6ce61df05f4e21ad954f9ddb487eda8fb64f41
Executing git -C /tmp/nimble_94295/_tmptlockfileoriginsdep1_0.1.0_8b6ce61df05f4e21ad954f9ddb487eda8fb64f41 init
Downloading /tmp/tlockfile/origins/dep2 using git
Cloning revision: d1ba2f37a1647ca1ed804dfa0c8c73a7de98201e
Executing git -C /tmp/nimble_94295/_tmptlockfileoriginsdep2_0.1.0_d1ba2f37a1647ca1ed804dfa0c8c73a7de98201e init
Error: Resource temporarily unavailable (code: 11)
使用的 Git 版本是:
> git --version
git version 2.31.1
该问题仅发生在 Linux 上,我的测试在 Windows 和 macOS 系统上正常通过。这个问题的原因是什么?