提交 ccf3351b 编写于 作者: K Kohsuke Kawaguchi

improved SSH usage compatibility

上级 c133badc
......@@ -365,6 +365,11 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable {
}
protected Charset getClientCharset() throws IOException, InterruptedException {
if (channel==null)
// for SSH, assume the platform default encoding
// this is in-line with the standard SSH behavior
return Charset.defaultCharset();
String charsetName = checkChannel().call(new GetCharset());
try {
return Charset.forName(charsetName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册