-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On Windows, query console directly, not stdout.
On Windows, we must manually enable VT processing on the console. Prior to this commit, we attempted to obtain a handle to the console by querying stdout. If stdout has been redirected, however, then the handle doesn't correspond to the console but instead to the redirected output. As a result, calls to enable VT processing fail. By default, this results in `yansi` disabling coloring. While this ordinarily doesn't have an impact on the expected functionality as the console and stdout are one and the same, it disproportionately affects running Rust unit tests that assume `yansi` coloring is in effect. This is because Cargo captures stdout, redirecting it away from the console. This commit resolves this issue, allowing unit tests to work as expected.
- Loading branch information
1 parent
47b23c3
commit 0bf346e
Showing
1 changed file
with
60 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters