jbonofre opened a new pull request, #2544:
URL: https://github.com/apache/karaf/pull/2544

   ## Summary
   
   - `SshCommandTestBase.openSshChannel` previously allocated a pseudo-terminal 
(PTY) for the shell channel, even though all tests use it for scripted 
(non-interactive) command execution.
   - With a PTY allocated, JLine on the server side runs in fully interactive 
mode and re-renders each character as it is received.  On Windows, where I/O 
flush timing differs from Linux/macOS, this produces garbled output such as 
`conficonfigconfig:property-set` in the captured output stream.
   - The prior workaround (`setPtyModes(PtyMode.ECHO, 0)`) disabled terminal 
echo but still allocated a PTY, so JLine's display-refresh writes continued to 
pollute the output.
   - The fix calls `channel.setUsePty(false)` (available in Apache MINA SSHD 
`PtyCapableChannelSession`) so no PTY is requested and JLine runs in 
dumb/non-interactive mode — the raw command output is then captured cleanly on 
all platforms.
   
   ## Test plan
   
   - [ ] 
`ConfigSshCommandSecurityTest.testConfigCommandSecurityWithoutEditSessionViaSsh`
 passes on Windows CI
   - [ ] `ConfigSshCommandSecurityTest.testConfigCommandSecurityViaSsh` 
continues to pass on all platforms
   - [ ] No other SSH integration tests regress


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to