use of com.thoughtworks.go.util.command.PasswordArgument in project gocd by gocd.
the class P4Client method p4.
CommandLine p4(String command, String... params) {
Map<String, String> env = new HashMap<>();
env.put("P4PORT", p4Port);
env.put("P4CLIENT", p4ClientName);
if (hasUser()) {
env.put("P4USER", p4user);
}
if (usingPassword()) {
env.put("P4PASSWD", p4passwd);
}
CommandLine line = createCommandLine("p4").withArgs(command).withArgs(params).withEnv(env);
if (hasPassword()) {
line = line.withNonArgSecret(new PasswordArgument(p4passwd));
}
return line;
}
Aggregations