Browse Source

config may return null-hostname for wildcard configs

master
Stefan Bodewig 4 years ago
parent
commit
f891c4bd8b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java

+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java View File

@@ -277,7 +277,9 @@ public abstract class SSHBase extends Task implements LogListener {
throw new BuildException("Failed to load the SSH configuration file " + sshConfig, e);
}
host = config.getHostname();
if (config.getHostname() != null) {
host = config.getHostname();
}
if (userInfo.getName() == null) {
userInfo.setName(config.getUser());


Loading…
Cancel
Save