Skip to content

Commit

Permalink
Set up OutputWriter earlier to fix --timings
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavohenke committed Dec 24, 2021
1 parent 850d2dc commit d3ac429
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/concurrently.js
Expand Up @@ -28,6 +28,15 @@ module.exports = (commands, options) => {

options = _.defaults(options, defaults);

if (options.logger) {
const outputWriter = new OutputWriter({
outputStream: options.outputStream,
group: options.group,
commands,
});
options.logger.observable.subscribe(({command, text}) => outputWriter.write(command, text));
}

const commandParsers = [
new StripQuotes(),
new ExpandNpmShortcut(),
Expand Down Expand Up @@ -70,15 +79,6 @@ module.exports = (commands, options) => {
maybeRunMore(commandsLeft);
}

if (options.logger) {
const outputWriter = new OutputWriter({
outputStream: options.outputStream,
group: options.group,
commands,
});
options.logger.observable.subscribe(({command, text}) => outputWriter.write(command, text));
}

return new CompletionListener({
successCondition: options.successCondition,
})
Expand Down

0 comments on commit d3ac429

Please sign in to comment.