question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support force tty of nodeConsole

See original GitHub issue

Feature request

What is the expected behavior?

Provide some environment variable or someway to support force set tty of nodeConsole.

What is motivation or use case for adding/changing the behavior?

To use with Jenkins.

I make builds using Jenkins, and it supports colors by AnsiColor plugin. Since Jenkins shows ‘Console Output’ as non-TTY environment, I need to set force color options many place. So I want something like https://github.com/webpack/webpack-cli supporting force color via .npmrc color=always.

How should this be implemented in your opinion?

https://github.com/webpack/webpack/blob/263c950952ca6aad298f2b7651c06e072fbf3e62/lib/node/nodeConsole.js#L11

Change above to below:

const tty = (process.stderr.isTTY && process.env.TERM !== "dumb") || process.env.TERM === "tty";

Are you willing to work on this yourself? Yes

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
alexander-akaitcommented, Mar 17, 2021

Yes, let’s send a PR

1reaction
alexander-akaitcommented, Mar 22, 2021

We can provide option to disable/enable colors for infrastructureLogging and you can implement any logic on own side

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manual for nodeconsole - Lenovo HPC
nodeconsole opens an interactive console session to a given node. This is the text or serial console of a system. Exiting is done...
Read more >
Why is __dirname not defined in node REPL? - Stack Overflow
__dirname is only defined in scripts. It's not available in REPL. try make a script a.js console.log(__dirname);. and run it: node a.js.
Read more >
tip · cisco-nexus-snmpit-support · Chad Dougherty / emulab-devel ...
Support for talking to a socket instead of a tty device. We use this for connecting to our "capture" console serial line proxy....
Read more >
Urika-GX System Administration Guide 2.0UP00 S ... - HPE Support
tty, Display status of all established remote console sessions or kill specified connection ... [r0s0i0 /]# history tty help history ver ok [r0s0i0...
Read more >
screen.info-2 - Apple Open Source
For tty windows, the `info' command shows some of the modem control lines in the ... `Screen' must be compiled with multiuser support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found