arcanis/clipanion

The "Options" section will always have rich formatting enabled

Closed this issue · 0 comments

I'm using clipanion@3.2.0-rc.4.
In testing my CLI using clipanion, I tried to use the environment variables NO_COLOR and FORCE_COLOR to force disabling color output. However, only the "Options" section was not in text format.

スクリーンショット 2021-12-09 13 24 26
スクリーンショット 2021-12-09 13 24 10

The reason for this is that only the "Options" section uses the richFormat.header() method directly.

if (options.length > 0) {
result += `\n`;
result += `${richFormat.header(`Options`)}\n`;

I think this is a bug because all the other sections use the this.format(colored).header() method.