Skip to content

Commit

Permalink
Merge pull request #64922 from akien-mga/dotnet-fix-app-host-version-…
Browse files Browse the repository at this point in the history
…detection

.NET: Change NETCore.App version detection to use highest match
  • Loading branch information
akien-mga authored Aug 27, 2022
2 parents 6ba932e + 3d43ffd commit b5294b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/mono/build_scripts/mono_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def find_app_host_version(dotnet_cmd, search_version_str):
from distutils.version import LooseVersion

search_version = LooseVersion(search_version_str)
found_match = False

try:
env = dict(os.environ, DOTNET_CLI_UI_LANGUAGE="en-US")
Expand All @@ -172,7 +173,10 @@ def find_app_host_version(dotnet_cmd, search_version_str):
version = LooseVersion(version_str)

if version >= search_version:
return version_str
search_version = version
found_match = True
if found_match:
return str(search_version)
except (subprocess.CalledProcessError, OSError) as e:
import sys

Expand Down

0 comments on commit b5294b5

Please sign in to comment.