mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Merge pull request #11090 from amarshall/fix-stackoverflow-build
Fix stackoverflow during doc generation
This commit is contained in:
commit
6c5d2a1506
1 changed files with 4 additions and 1 deletions
|
@ -116,9 +116,12 @@ let
|
||||||
storeInfo = commandInfo.stores;
|
storeInfo = commandInfo.stores;
|
||||||
inherit inlineHTML;
|
inherit inlineHTML;
|
||||||
};
|
};
|
||||||
|
hasInfix = infix: content:
|
||||||
|
builtins.stringLength content != builtins.stringLength (replaceStrings [ infix ] [ "" ] content);
|
||||||
in
|
in
|
||||||
optionalString (details ? doc) (
|
optionalString (details ? doc) (
|
||||||
if match ".*@store-types@.*" details.doc != null
|
# An alternate implementation with builtins.match stack overflowed on some systems.
|
||||||
|
if hasInfix "@store-types@" details.doc
|
||||||
then help-stores
|
then help-stores
|
||||||
else details.doc
|
else details.doc
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue