in powershell-agent/src/main/java/jetbrains/buildServer/powershell/agent/detect/cmd/CommandLinePowerShellDetector.java [132:145]
private void doDetectionCycle(Map<String, PowerShellInfo> shells,
List<String> pathsToCheck,
List<String> executablesToCheck,
String scriptPath,
List<String> additionalParameters) {
for (String path: pathsToCheck) {
for (String executable: executablesToCheck) {
final PowerShellInfo detected = doDetect(path, executable, scriptPath, additionalParameters);
if (detected != null) {
shells.put(detected.getHome().getAbsolutePath(), detected);
}
}
}
}