-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-find returns unexpected results #290
Comments
@matcav @tydunkel this may not be a straight-forward fix. The current glob implementation uses C++ regex and builds a pattern that has a trailing, optional backslash so that it can match files in the root (which globstars are supposed to). We can't make that backslash required without breaking existing, common patterns. Also, C++ 11 regex uses ECMA-262 grammar (though this implementation doesn't use the full ECMAScript version because it doesn't need it) so grammar is limited. For example, lookahead assertions are supported, but not lookbehind (which is what I think is needed here). A full glob implementation may actually be necessary. |
Using
-find
with for example**\cl.exe
returns in my case the expected multiple results, likeHostx64\x64\cl.exe
andHostx86\x64\cl.exe
.Additionally, it returns an unexpected result:
Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\usr\bin\getfacl.exe
.Based on the description (option:
-h
) I expect onlycl.exe
in any directory to be returned with**\cl.exe
as the argument to-find
.getfacl.exe
does not fit this criterion.**\*\cl.exe
seems to be a workaround, but it quadruples the runtime of vswhere (from ~1 second to ~4 seconds).Full Output on my specific setup:
$vswhere holds the full path as string to vswhere.exe as part of the VS Installer.
I found this issue first with the vswhere.exe shipped with Visual Studio Installer (3.1.1) and tested again with the latest version available in this repository (3.1.4). Both are affected.
The text was updated successfully, but these errors were encountered: