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

ENH: --no-color CLI argument option to remove color for better automation/pipeline output #71

Open
davidjeddy opened this issue Jul 11, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@davidjeddy
Copy link

What would you like to be added: --no-color CLI argument option

Why is this needed: Automation/Pipeline/Terminals with no color support display garbage string \033[0m

Additional context:

image

@davidjeddy davidjeddy added the enhancement New feature or request label Jul 11, 2023
@davidjeddy davidjeddy changed the title --no-color CLI argument option ENH: --no-color CLI argument option to remove color for better automation/pipeline output Jul 11, 2023
@noqcks
Copy link
Collaborator

noqcks commented Jul 12, 2023

Is this just the install script displaying the garbage color strings? Or does it happen with usage of xeol cli as well?

we do check if the terminal supports colors in the install script here, but it seems like it's failing in this case.

can you tell me what these two commands return in your shell

  • tput colors
  • echo $TERM

@noqcks noqcks self-assigned this Jul 12, 2023
@davidjeddy
Copy link
Author

davidjeddy commented Jul 19, 2023

Looks to be the installer is printing the color characters.

bash-5.2$ tput colors
256
bash-5.2$ echo $TERM
xterm-256color
bash-5.2$ xeol version
Application:          xeol
Version:              0.3.3
Syft Version:         v0.83.1
GitCommit:            14f8eb757b5431a96d13fcdadbcc3e518daa63c7
Platform:             linux/amd64
bash-5.2$ curl -sSfL https://raw.githubusercontent.com/xeol-io/xeol/main/install.sh | sh -s -- -b /usr/local/bin
[info]\033[0m checking github for the current release tag \033[0m
[info]\033[0m fetching release script for tag='v0.4.1' \033[0m
[info]\033[0m checking github for the current release tag \033[0m
[info]\033[0m using release tag='v0.4.1' version='0.4.1' os='linux' arch='amd64' \033[0m
install: cannot remove '/usr/local/bin/xeol': Permission denied
\033[0;31m\033[1m[error]\033[0m failed to install xeol \033[0m

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

No branches or pull requests

2 participants