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

Package Name does not appear on powershell #125

Open
anantoghosh opened this issue Nov 17, 2016 · 3 comments
Open

Package Name does not appear on powershell #125

anantoghosh opened this issue Nov 17, 2016 · 3 comments

Comments

@anantoghosh
Copy link

Using david (9.0.0) on local windows 10 machine (x64 build 14393) with powershell (5.1.14393.206).

When showing available updates it does not show the package names.

david

@jpaulin
Copy link
Contributor

jpaulin commented Dec 3, 2016

Probably starting at line 101 in bin/david.js
table.push([
clc.magenta(name),
clc.red(dep.required),
clc.green(dep[argv.unstable ? 'latest' : 'stable'])
])

That particular line:
clc.magenta(name)

inserts the name of the package into left-most cell, using magenta as color. And that color doesn't render well on a Powershell's blue background.

I guess the text "npm" is found, if you select (paint) the blank-looking table cell with mouse?

This is a "best guess". I'm out of MS Windows totally, so can't test results of changing the color. Hope a test can reveal whether another approach to color works.

@anantoghosh
Copy link
Author

That's what I thought too. Found this chalk/chalk#2
Seems like magenta is changed to deep blue in powershell.
Tested with different color, works.

@jpaulin
Copy link
Contributor

jpaulin commented Dec 23, 2016

Thanks for the link to chalk talk about colors.

One solution would be to

  • first identify platform (Win/Mac/Linux) and store this in a "global enough" (scope) variable
  • define colors (safe ones) based on the platform, knowing there are some "invisible" combinations

Albeit (probably) easy thing to do, this would be worth thinking: "Is this (david) the right place to do such a color patch?"
@alanshaw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants