fetchFromGitHub: use fetchgit when the rootDir option is set

This argument was added to fetchgit in #427165,
and it's not supported by fetchzip.

Co-authored-by: Philip Taron <philip.taron@gmail.com>
This commit is contained in:
Michael Daniels
2025-10-02 21:17:23 -04:00
co-authored by Philip Taron
parent 638e1bf59b
commit 42637c305f
2 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -18,7 +18,8 @@ lib.makeOverridable (
private ? false,
forceFetchGit ? false,
fetchLFS ? false,
sparseCheckout ? [ ],
rootDir ? "",
sparseCheckout ? lib.optional (rootDir != "") rootDir,
githubBase ? "github.com",
varPrefix ? null,
meta ? { },
@@ -69,6 +70,7 @@ lib.makeOverridable (
|| deepClone
|| forceFetchGit
|| fetchLFS
|| (rootDir != "")
|| (sparseCheckout != [ ]);
# We prefer fetchzip in cases we don't need submodules as the hash
# is more stable in that case.