Skip to content

@unocss/cli writes cli log to stdout which should be stderr instead #4006

Description

@nomyfan

UnoCSS version

0.61.5

Describe the bug

I tried to use the CLI to generate CSS content and captured the output from stdout in my script, but I found the CLI log is also written to the stdout, which makes the output look like this

unocss v0.61.5
◐ UnoCSS for production...
.bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0 / var(--un-bg-opacity)) /* #000 */;}

Reproduction

  1. File index.html
<div class="bg-black"></div>
  1. Run the command pnpm unocss index.html --stdout > styles.css and inspect the CSS file

System Info

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions