Skip to content

Use IsTerminal instead of OutputIsRedirected #2248

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

Merged
merged 2 commits into from
May 31, 2022
Merged

Use IsTerminal instead of OutputIsRedirected #2248

merged 2 commits into from
May 31, 2022

Conversation

AnomalRoil
Copy link
Member

Deprecate out.OutputIsRedirected in favour of !ctxutil.IsTerminal.

Fixes #2025.

RELEASE_NOTES=[CLEANUP] Deprecate OutputIsRedirected in favour of IsTerminal

Fixes #2025

Signed-off-by: Yolan Romailler <[email protected]>
@AnomalRoil AnomalRoil requested a review from dominikschulz May 31, 2022 07:52
Copy link
Member

@dominikschulz dominikschulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GHA comments are correct. You need to pass in ctx.

Signed-off-by: Yolan Romailler <[email protected]>
@AnomalRoil
Copy link
Member Author

Yup, sorry for that, I had Go 1.17.9 installed locally with golangci-lint 1.45 so couldn't run it locally, and then really wanted to go to bed yesterday evening 😅

@AnomalRoil
Copy link
Member Author

The Linux build golangci-lint issue is fixed in #2245.

@AnomalRoil AnomalRoil requested a review from dominikschulz May 31, 2022 09:07
@AnomalRoil AnomalRoil changed the title Use IsTermninal instead of OutputIsRedirected Use IsTerminal instead of OutputIsRedirected May 31, 2022
Copy link
Member

@dominikschulz dominikschulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dominikschulz dominikschulz merged commit d00a8e1 into master May 31, 2022
@dominikschulz dominikschulz deleted the fix/2025 branch May 31, 2022 09:11
@AnomalRoil AnomalRoil mentioned this pull request May 31, 2022
kpitt pushed a commit to kpitt/gopass that referenced this pull request Jul 21, 2022
* Use IsTermninal instead of OutputIsRedirected

RELEASE_NOTES=[CLEANUP] Deprecate OutputIsRedirected in favour of IsTerminal

Fixes gopasspw#2025

Signed-off-by: Yolan Romailler <[email protected]>

* Fix lint

Signed-off-by: Yolan Romailler <[email protected]>
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.

Consider replacing out.OutputIsRedirected by ctxutil.IsTerminal(ctx)
2 participants