handle inline entry case
This commit is contained in:
parent
fac9a1ef95
commit
5f85e5c218
1 changed files with 5 additions and 4 deletions
|
@ -2,6 +2,7 @@ pkgs: src: {extraArgs, entries, templates}: let
|
|||
inherit (pkgs) lib;
|
||||
|
||||
inherit (builtins) dirOf;
|
||||
inherit (lib.attrsets) isAttrs;
|
||||
inherit (lib.lists) forEach;
|
||||
inherit (lib.strings) concatMapStrings escapeShellArg;
|
||||
|
||||
|
@ -17,11 +18,11 @@ pkgs: src: {extraArgs, entries, templates}: let
|
|||
getEntry = getEntry args' templates src;
|
||||
};
|
||||
|
||||
processEntryFile = entryFile: let
|
||||
foundTemplateFn = findTemplateFn templates entry.template;
|
||||
entry = getEntry args templates src entryFile;
|
||||
processEntryFile = entry: let
|
||||
entry' = if isAttrs entry then entry else getEntry args templates src entry;
|
||||
foundTemplateFn = findTemplateFn templates entry'.template;
|
||||
in
|
||||
applyTemplate args templates foundTemplateFn entry;
|
||||
applyTemplate args templates foundTemplateFn entry';
|
||||
|
||||
in /*sh*/''
|
||||
${concatMapStrings
|
||||
|
|
Loading…
Reference in a new issue