Skip to content

Commit

Permalink
commands: pass input to first command in additional commands list
Browse files Browse the repository at this point in the history
  • Loading branch information
71 committed Apr 30, 2022
1 parent 74d2238 commit 57fc476
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 106 deletions.
4 changes: 2 additions & 2 deletions src/commands/load-all.build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function determineFunctionFlags(f: Builder.ParsedFunction) {
}

function buildCommandsExpression(f: Builder.AdditionalCommand) {
const commands = f.commands!.replace(/ +/g, " ").replace(/ \}\]/g, ", ...argument }]");
const commands = f.commands!.replace(/ +/g, " ");

return `(_, argument) => _.runAsync(() => commands(${commands}))`;
return `(_, argument) => _.runAsync(() => runCommands(argument, ${commands}))`;
}
Loading

0 comments on commit 57fc476

Please sign in to comment.