use of com.thoughtworks.go.util.command.SafeOutputStreamConsumer in project gocd by gocd.
the class BuildSession method newSafeConsole.
private SafeOutputStreamConsumer newSafeConsole() {
ProcessOutputStreamConsumer processConsumer = new ProcessOutputStreamConsumer<>(console, console);
SafeOutputStreamConsumer streamConsumer = new SafeOutputStreamConsumer(processConsumer);
for (String secret : secretSubstitutions.keySet()) {
streamConsumer.addSecret(new SecretSubstitution(secret, secretSubstitutions.get(secret)));
}
return streamConsumer;
}
use of com.thoughtworks.go.util.command.SafeOutputStreamConsumer in project gocd by gocd.
the class BuildWork method dumpEnvironmentVariables.
private void dumpEnvironmentVariables(EnvironmentVariableContext environmentVariableContext) {
Set<String> processLevelEnvVariables = ProcessManager.getInstance().environmentVariableNames();
List<String> report = environmentVariableContext.report(processLevelEnvVariables);
SafeOutputStreamConsumer safeOutput = safeOutputStreamConsumer(environmentVariableContext);
for (int i = 0; i < report.size(); i++) {
String line = report.get(i);
safeOutput.stdOutput((i == report.size() - 1) ? line + "\n" : line);
}
}
Aggregations