Skip to content

Commit ebbc053

Browse files
authored
feat(clap): enable always colored text (#20)
1 parent 53b8c85 commit ebbc053

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/green-cherries-yawn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'clap-js': patch
3+
---
4+
5+
Set color choice to always

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- '**/*.gitignore'
1818
- .editorconfig
1919
- docs/**
20+
- cspell.json
2021
workflow_call: null
2122
concurrency:
2223
group: '${{ github.workflow }}-${{ github.ref }}'

src/command.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ pub fn define_command(options: Command) -> Command {
1212
#[napi]
1313
pub fn run(env: Env, cmd: Command, args: Option<Vec<String>>) -> Result<()> {
1414
let args = resolve_option_args(args);
15-
let clap = resolve_command(clap::Command::default(), Default::default(), &cmd);
15+
let clap = resolve_command(clap::Command::default(), Default::default(), &cmd)
16+
.color(clap::ColorChoice::Always);
1617
let matches = clap.clone().get_matches_from(&args);
1718

1819
let mut parsed_args = env.create_object()?;

0 commit comments

Comments
 (0)