diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-27 18:58:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-27 18:58:40 +0200 |
commit | b5294b575906272cd0e2e178712e657cf6b52dd5 (patch) | |
tree | 089fedfafb70a9674c6a3127753093508e1f2f0a /modules/mono | |
parent | 6ba932e43df7538b1ec72d36d6bbc69b62ef6f4a (diff) | |
parent | 3d43ffdb5bffbbb69d4f5981140c8a6b8b6eaed6 (diff) |
Merge pull request #64922 from akien-mga/dotnet-fix-app-host-version-detection
.NET: Change NETCore.App version detection to use highest match
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/build_scripts/mono_configure.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py index 3277f9beeb..ef7dbabf66 100644 --- a/modules/mono/build_scripts/mono_configure.py +++ b/modules/mono/build_scripts/mono_configure.py @@ -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") @@ -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 |