Skip to content

Assumption about setting colors in output is not valid; doesn't work in cmd on windows #363

Closed

Description

@rfay

What happened (or feature request):

We have an assumption in our code that we can output control characters to change colors, and it's not really valid.

term_color

We probably have to adjust the places that we output control characters to respect the terminal capabilities of the current terminal. Alternately we could do it by operating system.

What you expected to happen:

I don't expect to see raw control characters.

How to reproduce it (as minimally and precisely as possible):

Do a ddev list against a running system on windows cmd.

Anything else do we need to know:

Related source links or issues:

Activity

  1. beeradb commented on Jul 7, 2017

    @beeradb
    Contributor

    https://github.com/fatih/color is the package we use and it claims to have windows support. Fixing this may be as easy as updating the package.

    Their examples are a bit different from our usage, though, so there may still be some adjustment needed.

  2. beeradb commented on Jul 7, 2017

    @beeradb
    Contributor

    Just adding this: it looks like it was merged in February of this year, which is definitely after we added the package to vendor. fatih/color#61

  3. rfay commented on Jul 9, 2017

    @rfay
    MemberAuthor

    I may have been too fixated on ddev list - it appears to me that some other things are working. For example, the success after db import is greenish.

    colors

  4. rfay commented on Mar 7, 2018

    @rfay
    MemberAuthor

    This is pretty ugly for our poor Windows users. Time to take a look at it. Moving it into the sprint for prioritization.

  5. rfay commented on Apr 13, 2018

    @rfay
    MemberAuthor
  6. added this to the v0.18.0 milestone on Apr 16, 2018
  7. rfay commented on Apr 16, 2018

    @rfay
    MemberAuthor

    Added to v0.18.0. Although there is apparently some support, it's my expectation that we'll have to just turn off colors to get suitable behavior in all windows "terminals".

  8. added 2 commits that reference this issue on Apr 17, 2018
    d092fad
    46c2067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions