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

Configure default terminalWidth for non TTY environment #14

Open
abourdin opened this issue Nov 17, 2020 · 4 comments
Open

Configure default terminalWidth for non TTY environment #14

abourdin opened this issue Nov 17, 2020 · 4 comments

Comments

@abourdin
Copy link

Here in the code, the terminal width is defaulted to 80 for non-TTY terminals:

if typeof cols is 'number' && cols > 30 then cols else 80

This is causing lines to be cut when using in a context where Node is run using terminal redirection (WebStorm run console, AWS CloudWatch logs, ...)

Would it be possible to introduce an environment variable or a way to change this default value? If yes, I can open a pull-request for that.
Environment variable could be something like RENDERKID_DEFAULT_TERMINAL_WIDTH.

@RayBenefield
Copy link

RayBenefield commented Dec 21, 2020

Would like to echo this need to run on non-TTY terminals 😁

@AriaMinaei
Copy link
Owner

Would it be possible to introduce an environment variable

@abourdin That sounds doable but is there a better, automated way to do this? I want to avoid complicating people's setup as much as possible.

@abourdin
Copy link
Author

I could not find any, and I guess there is probably none, since non-TTY terminals don't have a fixed width.
This could simply be provided as an extra configuration with a default value that could remain 80, but still be available for people who have the need to customise that value.

@RayBenefield
Copy link

Yes please. Ran into this again trying to run things with concurrently 😭😭😭

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

No branches or pull requests

3 participants