NoShell: Only include username into example clone command if it is set

Otherwise the command may contain "null@".

Change-Id: I22ac0c6c31216df61caccec1b24101a5f72a0a28
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2018-01-23 11:22:07 +01:00
parent 123c4b0ae1
commit e3a99a13c9

View File

@@ -171,8 +171,10 @@ class NoShell implements Factory<Command> {
}
msg.append(" git clone ssh://");
msg.append(user.getUserName());
msg.append("@");
if (user.getUserName() != null) {
msg.append(user.getUserName());
msg.append("@");
}
msg.append(host);
msg.append("/");
msg.append("REPOSITORY_NAME.git");