doitintl / kube-no-trouble

Easily check your clusters for use of deprecated APIs
MIT License
3.21k stars 158 forks source link

fix: install.sh in dumb TERM #587

Closed FabioAntunes closed 7 months ago

FabioAntunes commented 7 months ago

When $TERM is dumb the number of colours returned is -1 we end up with no values set for the colours.

To test this:

export TERM=dumb
sh -c "$(curl -sSL https://git.io/install-kubent)"

You should get an error regarding parameter expansion:

sh: 96: GREEN: parameter not set

This PR fixes the issue by initialising the variables no matter what.

dark0dave commented 7 months ago

Thanks!

dark0dave commented 7 months ago

Can you run the pre-commit? @FabioAntunes

FabioAntunes commented 7 months ago

I raised the PR through the GitHub ui, noticed that the issue was white spaces I have pushed some changes to fix those white spaces issue. if that’s not enough to make the pipeline happy I will run the pre-commit later today.

On Wed, 17 Apr 2024 at 11:36, dark0dave @.***> wrote:

Can you run the pre-commit? @FabioAntunes https://github.com/FabioAntunes

— Reply to this email directly, view it on GitHub https://github.com/doitintl/kube-no-trouble/pull/587#issuecomment-2060952822, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATNIINPZNDRQOMVUBTGRLLY5ZGEHAVCNFSM6AAAAABGJXD72GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRQHE2TEOBSGI . You are receiving this because you were mentioned.Message ID: @.***>

dark0dave commented 7 months ago

Thanks!