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

Doesn't print in colour and messes up re-printing in the same line #1451

Closed
ghost opened this issue Jun 29, 2018 · 4 comments
Closed

Doesn't print in colour and messes up re-printing in the same line #1451

ghost opened this issue Jun 29, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 29, 2018

When I update Rust, it looks like this:
capture
I'm using Windows 10 Home Single Language, Version 1803.
I use Hyper as my terminal emulator (I just love its UI). It auto-updates, but I don't think the version of Hyper is relevant because it has done this for every update I've done.
Right now, I have rustup 1.11.0 (e751ff9f8 2018-02-13).

Using powershell doesn't print in colour but re-printing on the same line works.

@pmarcelll
Copy link

The color issue is probably vercel/hyper#2038.

@pmarcelll
Copy link

I investigated a bit, this line is responsible for clearing the line:

https://github.com/rust-lang-nursery/rustup.rs/blob/bb6f65f08ba3e8a6619a033b65611be0f0023e73/src/rustup-cli/download_tracker.rs#L163

It looks like this is a bug in term, or a bug in hyper. It's also worth mentioning, that the Result from the carriage_return() method is completely ignored here, so it might be possible to retrieve an error message from this method.

@pmarcelll
Copy link

Changing the line in question to unwrap() yields:

?[1minfo: ?[0msyncing channel updates for 'stable-x86_64-pc-windows-msvc'
?[1minfo: ?[0mlatest update on 2018-06-21, rust version 1.27.0 (3eda71b00 2018-06-19)
?[1minfo: ?[0mdownloading component 'rustc'
Total:   6.9 MiB Speed:   0 B/s                thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NotSupported', libcore\result.rs:945:5

So carriage_return() does something that is not supported in hyper. Other terminals work correctly, so this is either a missing feature in hyper, or term needs a workaround (because regular \r works).

@joshtriplett
Copy link
Member

Since this issue lies either in hyper or in term (or both), and apparently not in rustup, could you please report it on one of those two crates instead?

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

2 participants