in appengine-plugins-core/src/main/java/com/google/cloud/tools/appengine/operations/cloudsdk/PathResolver.java [129:144]
static void getLocationsFromLink(List<String> possiblePaths, Path link) {
try {
Path resolvedLink = link.toRealPath();
Path possibleBinDir = resolvedLink.getParent();
// check if the parent is "bin", we actually depend on that for other resolution
if (possibleBinDir != null && possibleBinDir.getFileName().toString().equals("bin")) {
Path possibleCloudSdkHome = possibleBinDir.getParent();
if (possibleCloudSdkHome != null && Files.exists(possibleCloudSdkHome)) {
possiblePaths.add(possibleCloudSdkHome.toString());
}
}
} catch (IOException ioe) {
// intentionally ignore exception
logger.log(Level.FINE, "Non-critical exception when searching for cloud-sdk", ioe);
}
}