Wrong color in ui.Warn when terminal.CommandColor is used

Open
#233 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
cli

Research direction

Start by reproducing the ui.Warn call with terminal.CommandColor("ibmcloud login") and inspect the implementations of ui.Warn and terminal.CommandColor. Trace how color state is handled around the substituted parameter. Done means the text after the yellow command returns to the expected purple color.

Written by the indexing model from the issue text.

Description

The output colors created by this command are incorrect:

ui.Warn("Try using the the '%s' command.", terminal.CommandColor("ibmcloud login"))

The text before the substituted parameter is purple as expected.
The substitute text is yellow as expected.
But the text after that is white instead of purple.

Not a critical error, but want to report it.

Dominant language
Go
Stars
35
Forks
53
Avg merge
1d 15h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IBM-Cloud/ibm-cloud-cli-sdk

All issues in IBM-Cloud/ibm-cloud-cli-sdk

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.