You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a codeowners file with the following contents:
/foo @team-one
* @team-two
Now make the following call:
codeowners list-files @team-one foo
This will return no results. But the owner command does return the proper result:
codeowners owner foo/bar.ext
I suspect the issue is caused by using Finder to list all files and to use the getRealPath() method. In the OwnerCommand this is not used, but the passed filename is passed straight into the Parser.
Solution might be to "clean" the paths before passing them to the matcher. But it might also be something worth investigating to see if this can be fixed more generally in the codeowners package by introducing a working directory or something similar.
The text was updated successfully, but these errors were encountered:
- Add unit tests for commands
- Replace usage of `SplFileInfo::getRealPath()` with casting to string due to usage of vfsStream
- Return passed path if `realpath()` returns `false` due to usage of vfsStream
- Introduce fix for issue #3
Reproduction scenario
Create a codeowners file with the following contents:
Now make the following call:
This will return no results. But the
owner
command does return the proper result:I suspect the issue is caused by using
Finder
to list all files and to use thegetRealPath()
method. In theOwnerCommand
this is not used, but the passed filename is passed straight into theParser
.Solution might be to "clean" the paths before passing them to the matcher. But it might also be something worth investigating to see if this can be fixed more generally in the
codeowners
package by introducing a working directory or something similar.The text was updated successfully, but these errors were encountered: