Skip to content

Conversation

@lxb007981
Copy link
Contributor

@lxb007981 lxb007981 commented Mar 8, 2025

There has been an issue stating that the output redirection does not work for sshpass. The reason is that, when output is redirected to another device, the returned value of GetStdHandle(STD_OUTPUT_HANDLE) can no longer to be set with ENABLE_VIRTUAL_TERMINAL_PROCESSING, nor GetConsoleScreenBufferInfo from it. So I made this fix, to silently continue when setting ENABLE_VIRTUAL_TERMINAL_PROCESSING fails, and give the pseudo console a default size.

I'm new to windows API programming, so this pr is just meant to provide a tentative solution. Thank you.

2. continue when SetConsoleMode(ENABLE_VIRTUAL_TERMINAL_PROCESSING) fails.
@xhcoding xhcoding merged commit 76b44ae into xhcoding:main Mar 23, 2025
1 check passed
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.

2 participants