Add option to color all stderr output in red#885
Open
tmatilai wants to merge 1 commit intodirenv:masterfrom
Open
Add option to color all stderr output in red#885tmatilai wants to merge 1 commit intodirenv:masterfrom
tmatilai wants to merge 1 commit intodirenv:masterfrom
Conversation
Add `color_stderr` configuration option. If set to `true`, everything printed in stderr is colored as red during the `.envrc` evaluation. This makes the errors much more easier to notice.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
color_stderrconfiguration option. If set totrue, everything printed in stderr is colored as red during the.envrcevaluation.This makes the errors much more easier to notice.
I guess that piping the stderr through
sedwith process substitution might have some issues in some complex cases. But I can't think of any, and haven't found any issues in my use cases in almost a year of ~daily use. But maybe still make the feature opt-in?It might also be more efficient to do the coloring in
direnv, but unfortunately I'm not at the required level in Go to implement it without some guidance. And I'm not even sure it can be done there as the stdout is redirected into stderr in stdlib.Depends on #884.