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

fix(mason_logger): throw StateError when prompting with no terminal attached #1285

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

felangel
Copy link
Owner

@felangel felangel commented Apr 4, 2024

Status

READY

Description

  • fix(mason_logger): throw StateError when prompting with no terminal attached
    • Currently if mason_logger is used to prompt for input from a user in an environment with no terminal attached (e.g. CI), the process will hang indefinitely. This change adjusts the behavior to throw a StateError in order to make it clear that prompting for input should only be done in contexts where a terminal is attached.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@felangel felangel added the bug Something isn't working label Apr 4, 2024
@felangel felangel self-assigned this Apr 4, 2024
@felangel
Copy link
Owner Author

felangel commented Apr 4, 2024

@bryanoltman, @erickzanardo lmk what you think.

@felangel felangel linked an issue Apr 17, 2024 that may be closed by this pull request
@felangel felangel merged commit 780d39d into master Apr 19, 2024
13 of 14 checks passed
@felangel felangel deleted the fix/mason-logger-ensure-terminal-attached branch April 19, 2024 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: mason_logger does not handle stdin.hasTerminal being false
2 participants