|
|
@@ -65,6 +65,7 @@ public class SSHExec extends SSHBase { |
|
|
|
private String inputString = null; // like <exec> |
|
|
|
private File inputFile = null; // like <exec> |
|
|
|
private boolean append = false; // like <exec> |
|
|
|
private boolean usePty = false; |
|
|
|
|
|
|
|
private Resource commandResource = null; |
|
|
|
|
|
|
@@ -171,6 +172,14 @@ public class SSHExec extends SSHBase { |
|
|
|
outputProperty = property; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Whether a pseudo-tty should be allocated. |
|
|
|
* @since Apache Ant 1.8.3 |
|
|
|
*/ |
|
|
|
public void setUsePty(boolean b) { |
|
|
|
usePty = b; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Execute the command on the remote host. |
|
|
|
* |
|
|
@@ -290,6 +299,7 @@ public class SSHExec extends SSHBase { |
|
|
|
if (istream != null) { |
|
|
|
channel.setInputStream(istream); |
|
|
|
} |
|
|
|
channel.setPty(usePty); |
|
|
|
channel.connect(); |
|
|
|
// wait for it to finish |
|
|
|
thread = |
|
|
|