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

disable visual progress effect in dumb terminals #3463

Merged

Conversation

jesse-black
Copy link
Contributor

Disables visual progress indicators in dumb terminals such as editor buffers which don't support terminal cursor movement. They configure the environment with TERM=dumb and in the case of emacs it configures the environment with TERM=emacs in compilation mode.

@@ -66,7 +66,7 @@ function cli(options) {
var ui = new UI({
inputStream: options.inputStream,
outputStream: options.outputStream,
ci: process.env.CI,
ci: process.env.CI || /^(dumb|emacs)$/.test(process.env.TERM),
Copy link
Member

Choose a reason for hiding this comment

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

Should we use process.stdout.isTTY instead of process.env.TERM?

https://nodejs.org/api/process.html#process_process_stdout
https://nodejs.org/api/tty.html#tty_tty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like process.stdout.isTTY has more to do with the process pipe type than with the terminal's capabilities, because it behaves differently across platforms. On Windows process.stdout.isTTY is true inside the Windows console and false inside emacs eshell and compilation-mode like we might expect for it to work here, but on OSX it is true inside all of them: emacs eshell, compilation-mode, as well as a real terminal.

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds like TERM might be the more resilient solution

@rwjblue thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

Happy to give it a go as process.env.TERM...

@stefanpenner
Copy link
Contributor

#yolo

stefanpenner added a commit that referenced this pull request Mar 18, 2015
disable visual progress effect in dumb terminals
@stefanpenner stefanpenner merged commit 1b66b4a into ember-cli:master Mar 18, 2015
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.

None yet

3 participants