We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I'm having some issues running a script that uses inquirer with windosu.
windosu
The problem is that within windosu context, inquirer is unable to correctly get the width of the terminal, which is being calculated with cli-width.
inquirer
I've submitted a PR to inquirer to set a default width of 80 characters which seems to work fine in most cases, however there is a way to make windosu share the correct width with the script it executes:
cli-width (in the latest version, v1.1.0), attempts to read the width from an environment variable (CLI_WIDTH) before going for the default value.
cli-width
CLI_WIDTH
This gives us an opportunity to calculate the width from windosu and pass it to child processes like this:
var cliWidth = require('cli-width'); var child_process = require('child_process'); child_process.spawn('foo', [ 'bar' ], { env: { CLI_WIDTH: cliWidth() } });
This way, scripts being called with windosu have a way to inherit this value, even if not written in NodeJS.
What do you think?
I'll send a PR for demonstration purposes later today, once I have access to a Windows PC.
The text was updated successfully, but these errors were encountered:
Sure, this sounds very reasonable. I look forward to seeing the pull request!
Sorry, something went wrong.
@tehsenaus PR sent!
No branches or pull requests
Hi, I'm having some issues running a script that uses inquirer with
windosu
.The problem is that within
windosu
context,inquirer
is unable to correctly get the width of the terminal, which is being calculated with cli-width.I've submitted a PR to inquirer to set a default width of 80 characters which seems to work fine in most cases, however there is a way to make
windosu
share the correct width with the script it executes:cli-width
(in the latest version, v1.1.0), attempts to read the width from an environment variable (CLI_WIDTH
) before going for the default value.This gives us an opportunity to calculate the width from
windosu
and pass it to child processes like this:This way, scripts being called with
windosu
have a way to inherit this value, even if not written in NodeJS.What do you think?
I'll send a PR for demonstration purposes later today, once I have access to a Windows PC.
The text was updated successfully, but these errors were encountered: