in backend/analyzer/installedIDEs/InstallationsFinder.go [200:215]
func detectInstallationByInnerPath(providedPath string, returnBinary bool) (ideaBinary string, err error) {
providedPath = filepath.Clean(providedPath)
providedDeep := strings.Count(providedPath, string(os.PathSeparator))
basePath := providedPath
for i := 1; i < providedDeep; i++ {
if ideaBinary, err := getIdeBinaryByPackage(basePath); err == nil {
if returnBinary {
return ideaBinary, nil
} else {
return basePath, nil
}
}
basePath = filepath.Dir(basePath)
}
return "", errors.New("Could not detect IDE by \"" + providedPath + "\" path")
}