-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
alpine reports a width of 0 for process.stdout.getWindowSize[0] #6
Conversation
… in turn breaks inquirer
alpine reports a width of 0 for process.stdout.getWindowSize[0]
Thoughts on semver for this change? It almost seems like a breaking change.. |
@knownasilya great question, what do you think @SBoudrias? seems like we could go one of two ways:
From my point of view, |
Yeah, having 0 returned looks like a bug to me too. @knownasilya can you expand your though as to why this would be a breaking change? |
@SBoudrias mainly because consumers have expected it to be zero if all fallbacks fail (or return 0), but maybe 0 is never a desired value so it would technically be an enhancement. |
@knownasilya thanks for being so receptive to a patch 👍 |
@knownasilya oh, I was confused because I though that was a discussion on the Inquirer repo. So yeah, that looks like major bump worthy for cli-width. |
Released as 1.1.1 |
Too late ;) I guess we'll see if anyone complains. |
@knownasilya but semver! I think you'll probably be okay, it looks like cli-width's dependencies are mostly inquirer, and forks of inquirer: |
Semver is very subjective |
@bcoe I can add you as a collaborator so we can share the blame 😉 |
When running through
docker exec
the Alpine OS reportsprocess.stdout.getWindowSize[0] = 0
, this in turn breaks the upstream inquirer dependency like so:https://gist.github.com/bcoe/6bc16d0dbe5190b8d302
It seems appropriate to instead use the default value if a terminal width of 0 is reported.