Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

wgsl: Do not make error output colorful when the terminal is dumb #1707

Merged
merged 1 commit into from
Jan 29, 2022

Conversation

rhysd
Copy link
Contributor

@rhysd rhysd commented Jan 29, 2022

Recently I'm trying to integrate naga command to my text editor to check WGSL sources on the fly.

However, a WGSL parse error output is hard to parse because it contains many color escape sequences. By this PR, error outputs are colorful only when stderr is connected to terminal. By this patch, tools like text editors can get error outputs without color escape sequences and easily parse the outputs.

@kvark kvark merged commit d6f8958 into gfx-rs:master Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants