argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.8k stars 5.43k forks source link

Application conditions should handle color codes #4770

Open jsoref opened 3 years ago

jsoref commented 3 years ago

Summary

Currently, color escapes are partially rendered (most likely the raw color escapes are sent to the web browser which ignores the escape character and shows the rest)

Motivation

This is ugly:

rpc error: code = Unknown desc = Manifest generation error (cached): `sh -c if [ -z "$VALUES_FILE" ]; then echo "./app.dhall"; else echo "./$VALUES_FILE"; fi | dhall-to-yaml --omit-empty` failed exit status 1: ↳ ./missing-file.dhall Error: Missing file ./missing-file.dhall 1│ ./missing-file.dhall (input):1:1

Specifically, 

Proposal

Either add support for color parsing, or add enough to suppress color output

jessesuen commented 3 years ago

Are you suggesting to strip out the codes or having the UI interpret them properly?

jsoref commented 3 years ago

There are three choices really:

  1. set the terminal to something which prevents color code generation in the first place
  2. strip color codes
  3. handle color codes

Offhand, I suspect that the first option is the easiest (possibly a handful of lines of code).

I'll take any of the above.