mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Merge pull request #11090 from amarshall/fix-stackoverflow-build
Fix stackoverflow during doc generation
This commit is contained in:
commit
6c5d2a1506
@ -116,9 +116,12 @@ let
|
||||
storeInfo = commandInfo.stores;
|
||||
inherit inlineHTML;
|
||||
};
|
||||
hasInfix = infix: content:
|
||||
builtins.stringLength content != builtins.stringLength (replaceStrings [ infix ] [ "" ] content);
|
||||
in
|
||||
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
|
||||
else details.doc
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user