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
Support Powershell console colors #39
Comments
It's more about bringing PowerShell to output the proper color escape codes, which the ansicolor plugin would interpret and translate into HTML. I'm not sure if that's possible, a quick search lead to nothing obvious. It may very well be that the PowerShell drives the Windows Terminal directly with some API when run within it, instead of outputting escape codes which would then be parsed. You can do the research to see if PowerShell can color its output using escape codes. If it can, then you might be lucky in that ansicolor supports them already. If there are unsupported ones, we might take shot at implementing them. But as said, that all depends on PowerShell actually outputting the color information. |
No it doesn't. I checked this by putting that line of PowerShell script into a file and ran the equivalent of powershell ./test.ps1 and observed the output. It's just the raw characters, no escape sequences whatsoever. Just digging around a little bit: The solution depends on whether one can write escape sequences to standard output at all. If true, the simplest solution is to replace calls to Even easier seems to just redefine
Mayhaps the scripts could be wrapped before execution... |
There's a workaround. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Powershell supports colors in its console output similar to other shells a la
Write-Host "Blue on Green!" -ForegroundColor Blue -BackgroundColor Green
It would be pretty freaking awesome if Powershell scripts run in Jenkins would display these output color choices. I am not a Java developer personally, but if this is easy enough to do I could take a swing at it. I could certainly test the feature if someone else implemented it.
The text was updated successfully, but these errors were encountered: