Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clap): enable always colored text #20

Merged
merged 1 commit into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/green-cherries-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'clap-js': patch
---

Set color choice to always
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- '**/*.gitignore'
- .editorconfig
- docs/**
- cspell.json
workflow_call: null
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}'
Expand Down
3 changes: 2 additions & 1 deletion src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ pub fn define_command(options: Command) -> Command {
#[napi]
pub fn run(env: Env, cmd: Command, args: Option<Vec<String>>) -> Result<()> {
let args = resolve_option_args(args);
let clap = resolve_command(clap::Command::default(), Default::default(), &cmd);
let clap = resolve_command(clap::Command::default(), Default::default(), &cmd)
.color(clap::ColorChoice::Always);
let matches = clap.clone().get_matches_from(&args);

let mut parsed_args = env.create_object()?;
Expand Down
Loading