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

Stop outputing ANSI color on non-TTY #6694

Merged
merged 1 commit into from
Jul 7, 2021
Merged

Conversation

ribasushi
Copy link
Collaborator

@ribasushi ribasushi requested a review from magik6k July 7, 2021 09:07
@magik6k magik6k merged commit 49896af into master Jul 7, 2021
@magik6k magik6k deleted the chore/no-unexpected-color branch July 7, 2021 13:04
@jburnett
Copy link

jburnett commented Jul 7, 2021

I'm not sure it this is the same issue, but up-voting if it is. When we want to watch sectors list, we use

watch --interval -600 "lotus-miner sectors list --color false| grep -v Proving"

which results in

ID   State                  OnChain  Active  Expiration                      Deals  DealWeight  VerifiedPower
19   ^[36mTerminateFailed^[0m        ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[34mCC^[0m
51   ^[36mTerminateFailed^[0m        ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[34mCC^[0m
159  ^[36mTerminateWait^[0m          ^[32mYES^[0m      ^[31mNO^[0m      2414219 (in 1 year 22 weeks)    ^[34mCC^[0m
179  ^[33mFinalizeSector^[0m         ^[32mYES^[0m      ^[31mNO^[0m      2448779 (in 1 year 24 weeks)    ^[34mCC^[0m
180  ^[33mFinalizeSector^[0m         ^[32mYES^[0m      ^[31mNO^[0m      2448779 (in 1 year 24 weeks)    ^[34mCC^[0m
187  ^[33mCommitting^[0m             ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[34mCC^[0m
189  ^[33mSubmitCommitAggregate^[0m  ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[34mCC^[0m
190  ^[33mPreCommit1^[0m             ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[34mCC^[0m
191  ^[33mPreCommit1^[0m             ^[31mNO^[0m       ^[31mNO^[0m      n/a                             ^[32m1^[0m

We've tried variations of color flag to remove the color/control chars. HTH

@ribasushi
Copy link
Collaborator Author

@jburnett no, that is a slightly different. An immediate workaround for you is to do:

lotus-miner sectors list --color=false

instead of your

lotus-miner sectors list --color false

( I suspect this is a urfavecli bug )

In any case - this is somewhat obnoxious so I opened a separate #6696

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

Successfully merging this pull request may close these issues.

3 participants