- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Problem with colors in console for generators on Win10 #4043
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
Comments
To better isolate the bug, try |
Not sure whats going on. It is symfony console that prints the text where those symbols are showing. |
I found where is problem. |
It works only for command: |
Thanks for tracking this down. A PR to skip the call to |
We already attempt a fallback for Windows so I'm not sure what the best way is to mitigate this issue. Suggestions welcome. See function below: https://github.com/drush-ops/drush/blob/10.x/src/Config/Environment.php#L444-L482 |
I can run "stty size 2>&1" in command line without any issue, but with this line in drush I'm losing coloring. I can guess that problem in one of:
This issue appear in command window which launched with command: |
generate is a very unusual command as it builds its own Application. If we can fix this for all other parts of drush first I think that makes sense. Can you change |
Well we'll have to change how we use its return code as well. |
Thank you @weitzman It works. But generators (not all) still have issues. I can investigate it when I will have time. But in any case thank you all. Now I can work more comfortably :) |
Reopening for generators |
I found source of problem in generators. This is still the same "stty". But now it's in \Symfony\Component\Console\Terminal::hasSttyAvailable method. This method is called in \Symfony\Component\Console\Helper\QuestionHelper::doAsk. I'm not sure how is the best way to fix this. |
Describe the bug

When I run drush commands in console - i get uncolored pieces with extra symbols.
This is cmder console in phpstorm. If I use conemu/cmder direct in folder (outside phpstorm) - no problem with colors.
System Configuration
The text was updated successfully, but these errors were encountered: