You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Concurrently's group option helps a lot, but it lacks an API to print stuff before and after.
Problem
There is no API to print stuff before and after commands.
In my use-case I only need 1 process, so I hacked my way around the start of the commands and when they are closed:
import{endGroup,startGroup}from'@actions/core';import{GITHUB_ACTIONS}from'ci-info';import{concurrently}from'concurrently';// ...constresult=concurrently(commands,{raw: true,group: true,
maxProcesses,});if(GITHUB_ACTIONS&&maxProcesses==='1'){result.commands.forEach((command)=>{if(command.state==='started'){// Commands immediately started after calling concurrently()startGroup(command.name);}else{// Commands started laterconstoriginalStart=command.start.bind(command);command.start=()=>{// Start is called before previous command close is called, so we need// to defer the start of the group until the close event is received.setTimeout(()=>{startGroup(command.name);},0);returnoriginalStart();};}command.close.subscribe(()=>{endGroup();});});}
Proposal
Extend group definition to allow prefix and suffixes:
Use-case
I'm trying to output a line before and after each command, to use Github Actions log grouping.
Concurrently's
group
option helps a lot, but it lacks an API to print stuff before and after.Problem
There is no API to print stuff before and after commands.
In my use-case I only need 1 process, so I hacked my way around the start of the commands and when they are closed:
Proposal
Extend group definition to allow prefix and suffixes:
Would also be nice to have an API to be informed when commands have started.
The text was updated successfully, but these errors were encountered: