Skip to content

No colors for prefixes when using prefixColors: "auto" via concurrent API #437

@OnkelTem

Description

@OnkelTem

concurrently: 8.2.1
node: v16.17.0

I use the following script to run concurrent processes:

const fs = require('fs')
const path = require('path')
const concurrently = require('concurrently')

const workspacePaths = JSON.parse(fs.readFileSync('./package.json')).workspaces

const { result } = concurrently(
  workspacePaths.map((wp) => ({
    command: 'npm:dev',
    name: path.basename(wp),
    cwd: path.resolve(__dirname, '../', wp),
  })),
  {
    prefix: 'name',
    killOthers: ['failure', 'success'],
    restartTries: 0,
    prefixColors: 'auto',
  }
)

result.then(
  () => {
    console.log('Success')
  },
  () => {
    console.log('Failed')
  }
)

However, when I run in the terminal, it doesn't show any colors in the prefixes:

image

yet other colors are displayed. What could be the problem?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions