fetchgit: adjust format for sparseCheckout default

Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
This commit is contained in:
Yueh-Shun Li
2025-12-08 21:52:45 +08:00
co-authored by Matt Sturgeon
parent 5c51547b22
commit ea1e4d73d8
+5 -1
View File
@@ -148,7 +148,11 @@ lib.makeOverridable (
inherit outputHash outputHashAlgo;
outputHashMode = "recursive";
sparseCheckout = lib.defaultTo (lib.optional (finalAttrs.rootDir != "") finalAttrs.rootDir) sparseCheckout;
sparseCheckout =
let
default = lib.optional (finalAttrs.rootDir != "") finalAttrs.rootDir;
in
lib.defaultTo default sparseCheckout;
sparseCheckoutText =
# Changed to throw on 2023-06-04
assert (