Skip to content

Commit

Permalink
Improve matches matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
bameyrick committed Oct 3, 2024
1 parent 4e29790 commit be8c084
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/concurrently.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ export function concurrently(commands: ConcurrentCommand[], index = 0): void {
}
case WaitCondition.Matches: {
runCommand(command.command, index, name, command.longestName, message => {
if (!conditionMet && stripAnsi(message).trim() === command.value?.trim()) {
if (
!conditionMet &&
message
.split('\n')
.map(item => stripAnsi(item).trim())
.includes(command.value!.trim())
) {
conditionMet = true;

concurrently(commands, nextIndex);
Expand Down

0 comments on commit be8c084

Please sign in to comment.