public GetPackageVersionResult parseVersion()

in sonar-plugin-server/src/main/java/jetbrains/buildserver/sonarplugin/msbuild/tool/SimpleZipToolProviderSQMSBuild.java [94:102]


    public GetPackageVersionResult parseVersion(final Path toolPackage, final String version) throws Exception {
        try (final FileSystem fs = FileSystems.newFileSystem(toolPackage, (ClassLoader)null)) {
            if (existsAndExecutable(fs, "/" + SONAR_QUBE_SCANNER_MSBUILD_EXE) || existsAndExecutable(fs, "/" + SONAR_QUBE_SCANNER_MSBUILD_ALT_EXE)) {
                return GetPackageVersionResult.version(new SonarQubeToolVersion(getToolType(), version, getToolType().getType() + "." + version));
            } else {
                return GetPackageVersionResult.error("Doesn't seem like SonarScanner for MSBuild: cannot find '" + SONAR_QUBE_SCANNER_MSBUILD_EXE + "'");
            }
        }
    }