infrahq / infra

Infra provides authentication and access management to servers and Kubernetes clusters.
https://infrahq.com
Other
1.37k stars 55 forks source link

Render ANSI colors correctly on Windows and when output from `kubectl` #399

Closed mchiang0610 closed 2 years ago

mchiang0610 commented 2 years ago

PowerShell v7.1.4.0

PS C:\Windows\System32> infra login registry.infrahq.com
? Choose a login method: Okta [dev-02708987.okta.com]
←[1;38;2;0;87;255m✓←[0m Logging in with Okta...
←[1;38;2;0;87;255m✓←[0m Logged in as ←[1mmichael@infrahq.com←[0m
←[1;38;2;0;87;255m✓←[0m Kubeconfig updated: ←[1m~\.kube\config←[0m
←[1;38;2;0;87;255m✓←[0m Kubernetes current context is now ←[1minfra:infrahq-production←[0m
PS C:\Windows\System32>
mxyng commented 2 years ago

This might be relevant https://github.com/muesli/termenv/issues/36. The magic, as is mentioned in the issue, is in https://github.com/charmbracelet/lipgloss/blob/master/ansi_windows.go

jmorganca commented 2 years ago

Adding an example from kubectl shelling out to infra:

Screen Shot 2021-10-20 at 10 19 14 AM

github-actions[bot] commented 2 years ago

Message to comment on stale issues. If none provided, will not mark issues stale.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.