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: incorrect stdout for mise shell function in xonsh #1862

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yggdr
Copy link
Contributor

@yggdr yggdr commented Apr 5, 2024

The old implementation had issues with piping the result since stdout/stderr was not acutally captured in the shell but directly printed to the terminal.
The fix here unfortunately effectivly turns off colors in mise, as mise seems to not honor CLICOLOR_FORCE et. al. environment variables as per #1836

@yggdr yggdr force-pushed the fix_shell_subcommand_xonsh branch 3 times, most recently from dceea0b to 5963167 Compare April 6, 2024 15:15
@jdx
Copy link
Owner

jdx commented Apr 6, 2024

I think it'd be better if we just found out why CLICOLOR_FORCE isn't working and fixed that directly

@yggdr
Copy link
Contributor Author

yggdr commented Apr 6, 2024

The coloring problem is only a side-effect of this fix, so it should imho have no bearing on whether this fix should be accepted or not. The fix addresses stdio within the xonsh shell which I handled incorrectly, thereby breaking pipe-ability. You can read about that here: xonsh/xonsh#5316

The old implementation had issues with piping the result since stdout/stderr was not acutally captured in the shell but directly printed to the terminal.
The fix here unfortunately effectivly turns off colors in mise, as mise seems to not honor CLICOLOR_FORCE et. al. environment variables as per jdx#1836
@yggdr yggdr force-pushed the fix_shell_subcommand_xonsh branch from b085fce to 104c14a Compare May 15, 2024 13:16
@yggdr yggdr changed the title xonsh shell: fix incorrect stdout for mise shell function fix: incorrect stdout for mise shell function in xonsh May 15, 2024
@booniepepper
Copy link
Contributor

I'd like to be able to fix the xonsh piping issue without regressing on color output.

@yggdr
Copy link
Contributor Author

yggdr commented May 15, 2024

I'd rather have a functionally working shell incl. pipeability than colours, nice though they may be. That the colours work at all in xonsh with the current code is a mere accident and side effect of my buggy original implementation.

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.

None yet

3 participants