Skip to content

Commit

Permalink
Merge pull request #1366 from KyleSiefring/fix_vs_version_check
Browse files Browse the repository at this point in the history
Fix Visual Studio version search
  • Loading branch information
danyeaw authored Jun 14, 2024
2 parents 9a55468 + ea3e83a commit 5e0f49c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gvsbuild/utils/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,11 @@ def __check_good_vs_install(self, opts, vs_path, exit_missing=True):
)

def __find_vs_path_with_vs_version(self, paths):
# Don't match version with data (e.g. vs version 17 with vs 2017)
vs_ver_re = re.compile("[^0-9]" + self.opts.vs_ver)

for path in paths:
if self.vs_ver_year[-4:] in path or self.opts.vs_ver in path:
if self.vs_ver_year[-4:] in path or vs_ver_re.search(path):
return path
log.debug(f"Can't find vs-ver {self.opts.vs_ver} in found VS installations.")

Expand Down

0 comments on commit 5e0f49c

Please sign in to comment.