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

Fix color output on Windows #551

Merged
merged 1 commit into from
Sep 21, 2024
Merged

Fix color output on Windows #551

merged 1 commit into from
Sep 21, 2024

Conversation

8LWXpg
Copy link
Contributor

@8LWXpg 8LWXpg commented Mar 20, 2024

Fix #128

I simply compare util_windows.go with util_unix.go, and setting c.Stdout, c.Stderr seems to have resolve this issue.

Screenshot

image

@8LWXpg
Copy link
Contributor Author

8LWXpg commented Mar 21, 2024

A question for this code:
Returning stdout and stderr then io.Copy seems redundant, since setting c.Stdout = os.Stdout and c.Stderr = os.Stderr basically does the same thing. Is there reason for this?

@cosmtrek cosmtrek merged commit 16db632 into air-verse:master Sep 21, 2024
1 check passed
@cosmtrek
Copy link
Collaborator

@8LWXpg yes, the related code need to refactor 😄

Comment on lines +34 to +35
c.Stdout = os.Stdout
c.Stderr = os.Stderr
Copy link
Contributor

Choose a reason for hiding this comment

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

These are overwrite StdoutPipe and StderrPipe.
https://cs.opensource.google/go/go/+/refs/tags/go1.23.1:src/os/exec/exec.go;l=1067

These pipe calls above should be removed.

jesses-code-adventures pushed a commit to jesses-code-adventures/air that referenced this pull request Sep 25, 2024
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.

Colour of gin's log
3 participants