Skip to content

fix: getting terminal width#98

Merged
joshsny merged 1 commit intomainfrom
fix-terminal-width
Jul 15, 2025
Merged

fix: getting terminal width#98
joshsny merged 1 commit intomainfrom
fix-terminal-width

Conversation

@joshsny
Copy link
Copy Markdown
Collaborator

@joshsny joshsny commented Jul 15, 2025

Sometimes this will fail, let's fix a width in that case.

Copilot AI review requested due to automatic review settings July 15, 2025 09:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a fallback for wrap width when the terminal isn’t a TTY.

  • Use process.stdout.isTTY check to decide between actual terminal width and a default of 80.
Comments suppressed due to low confidence (1)

bin.ts:110

  • Add a unit test that mocks process.stdout.isTTY as false to verify that the fallback width of 80 is applied correctly.
  .wrap(process.stdout.isTTY ? yargs.terminalWidth() : 80).argv;

Comment thread bin.ts
@joshsny joshsny requested a review from a team July 15, 2025 09:45
@joshsny joshsny merged commit d2a1346 into main Jul 15, 2025
11 checks passed
daniloc pushed a commit that referenced this pull request Oct 27, 2025
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