René's URL Explorer Experiment


Title: regression with tty detection · Issue #1459 · pre-commit/pre-commit · GitHub

Open Graph Title: regression with tty detection · Issue #1459 · pre-commit/pre-commit

X Title: regression with tty detection · Issue #1459 · pre-commit/pre-commit

Description: A recent regression was introduced via #1382 which broke detection on various conditions. For example, on my MacOS host, only stdout and stdin report True on isatty() while stderr reports False, even if in reality there is no problem wit...

Open Graph Description: A recent regression was introduced via #1382 which broke detection on various conditions. For example, on my MacOS host, only stdout and stdin report True on isatty() while stderr reports False, ev...

X Description: A recent regression was introduced via #1382 which broke detection on various conditions. For example, on my MacOS host, only stdout and stdin report True on isatty() while stderr reports False, ev...

Opengraph URL: https://github.com/pre-commit/pre-commit/issues/1459

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"regression with tty detection","articleBody":"A recent regression was introduced via https://github.com/pre-commit/pre-commit/pull/1382 which broke detection on various conditions.\r\n\r\nFor example, on my MacOS host, only `stdout` and `stdin` report True on `isatty()` while `stderr` reports False, even if in reality there is no problem with sending ANSI to stderr.\r\n\r\nProbably we should rely solely on `stdout` for the test or to assure that we respect it for each tty.\r\n\r\nThis issue is not happening with lots of people because only few of them use a method to colorize stderr, which apparently is what has a side-effect of marking it as a non tty. \r\n\r\nExample of zsh snippet from `~/.zshrc` that does this:\r\n```bash\r\n    export STDERRED_ESC_CODE=\"$fg[red]\"\r\n    if [[ \"$STDERR_COLORIZE\" != $$ ]]; then\r\n      if (( $+commands[colorize] )); then\r\n        exec 2>>(colorize $fg[yellow] $reset_color > /dev/tty &)\r\n      else\r\n        exec 2>>(while read line; do\r\n          print ${fg[yellow]}$line$reset_color > /dev/tty; print -n $'\\0'; done &)\r\n      fi\r\n      export STDERR_COLORIZE=$$\r\n    fi\r\n```\r\n\r\nOnce this runs you no longer gave a tty-enabled stderr.\r\n\r\nVast majority of CLI tools I know are using `sys.stdout.isatty()`, the only other exception I know is `mypy`. https://bixense.com/clicolors/ seems to support that approach too.\r\n\r\nRegarding the never-ending struggle to control ANSI on/off behavior where each tool invented its own implementation and variables to configure behavior, it seems that someone realized that maybe is time to do something about it https://no-color.org/ :)","author":{"url":"https://github.com/ssbarnea","@type":"Person","name":"ssbarnea"},"datePublished":"2020-05-15T12:23:27Z","url":"https://github.com/pre-commit/pre-commit/issues/1459"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a89ec777-ff16-0a9e-370f-769a9ed1b6ae
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE494:1188C0:144A5E5:1AD7058:6B066265
html-safe-nonceeba4cbd5c00b7a1abbc4b7d09a8f1eb159a2cf717b9c1d082934367c5853fdd6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDk0OjExODhDMDoxNDRBNUU1OjFBRDcwNTg6NkIwNjYyNjUiLCJ2aXNpdG9yX2lkIjoiNzU4ODkyNjU2MzQ4NDU5MDY5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceb4bcf0fbf8b0c817fda27fafbd290cc52c3f8d663b4b5c2e18173bf04614123
hovercard-subject-tagissue:618928648
github-keyboard-shortcutsrepository,issues,commits,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pre-commit/pre-commit/1459/issue_layout
twitter:imagehttps://opengraph.githubassets.com/990a6f1153485ed7f33dd4d959ed5ebfbb84e495104a8e97db80281c1a6b721f/pre-commit/pre-commit/issues/1459
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/990a6f1153485ed7f33dd4d959ed5ebfbb84e495104a8e97db80281c1a6b721f/pre-commit/pre-commit/issues/1459
og:image:altA recent regression was introduced via #1382 which broke detection on various conditions. For example, on my MacOS host, only stdout and stdin report True on isatty() while stderr reports False, ev...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamessbarnea
hostnamegithub.com
expected-hostnamegithub.com
None6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297
turbo-cache-controlno-preview
go-importgithub.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git
octolytics-dimension-user_id6943086
octolytics-dimension-user_loginpre-commit
octolytics-dimension-repository_id17689377
octolytics-dimension-repository_nwopre-commit/pre-commit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17689377
octolytics-dimension-repository_network_root_nwopre-commit/pre-commit
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7f0aa75f4141d440c6110dc31af7ea7797abb6c4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/pre-commit/pre-commit/issues/1459#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F1459
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F1459
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=pre-commit%2Fpre-commit
Reloadhttps://github.com/pre-commit/pre-commit/issues/1459
Reloadhttps://github.com/pre-commit/pre-commit/issues/1459
Reloadhttps://github.com/pre-commit/pre-commit/issues/1459
pre-commithttps://github.com/pre-commit
pre-commithttps://github.com/pre-commit/pre-commit
Codehttps://github.com/pre-commit/pre-commit
Issues17 (17)https://github.com/pre-commit/pre-commit/issues
Pull requests8 (8)https://github.com/pre-commit/pre-commit/pulls
Actionshttps://github.com/pre-commit/pre-commit/actions
Security and qualityhttps://github.com/pre-commit/pre-commit/security
Insightshttps://github.com/pre-commit/pre-commit/insights
https://github.com/pre-commit/pre-commit
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/1459
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/1459
regression with tty detectionhttps://github.com/pre-commit/pre-commit/issues/1459#top
https://github.com/ssbarnea
ssbarneahttps://github.com/ssbarnea
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issue-618928648
#1382https://github.com/pre-commit/pre-commit/pull/1382
https://bixense.com/clicolors/https://bixense.com/clicolors/
https://no-color.org/https://no-color.org/
https://github.com/asottile
asottilehttps://github.com/asottile
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629265986
https://camo.githubusercontent.com/a2e17991de5be1b9796025a4bfbb4e6c8e2213f1b7a4ff8b5be624e4a968865a/68747470733a2f2f692e666c756666792e63632f6664774c313050766a6d46366c35487171533456766d446764716836723152702e706e67
is documentedhttps://pre-commit.com/#command-line-interface
https://github.com/asottile
asottilehttps://github.com/asottile
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629268859
https://github.com/ssbarnea
ssbarneahttps://github.com/ssbarnea
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629273997
https://github.com/cehoffman/dotfiles/blob/master/zsh/config#L171-L193https://github.com/cehoffman/dotfiles/blob/master/zsh/config#L171-L193
https://github.com/asottile
asottilehttps://github.com/asottile
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629276968
https://github.com/ssbarnea
ssbarneahttps://github.com/ssbarnea
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629283584
https://github.com/asottile
asottilehttps://github.com/asottile
on May 15, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-629286459
https://github.com/asottile
asottilehttps://github.com/asottile
on Nov 27, 2020https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-734527826
git-for-windows/git#2914https://github.com/git-for-windows/git/issues/2914
https://github.com/benlindsay
benlindsayhttps://github.com/benlindsay
on Feb 28, 2022https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-1054618501
https://user-images.githubusercontent.com/9361152/156051240-d23d05f5-b14e-4478-8044-ccf679094950.png
https://github.com/asottile
asottilehttps://github.com/asottile
on Feb 28, 2022https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-1054637380
https://github.com/benlindsay
benlindsayhttps://github.com/benlindsay
on Mar 1, 2022https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-1054954325
https://github.com/asottile
asottilehttps://github.com/asottile
on Mar 1, 2022https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-1054955733
https://github.com/benlindsay
benlindsayhttps://github.com/benlindsay
on Mar 1, 2022https://github.com/pre-commit/pre-commit/issues/1459#issuecomment-1054958167
Sign up for freehttps://github.com/signup?return_to=https://github.com/pre-commit/pre-commit/issues/1459
Sign in to commenthttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/1459
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.