Skip to content

Conversation

@leonardochaia
Copy link
Owner

@leonardochaia leonardochaia commented Nov 12, 2024

Adds support for --filter-file-path to support relative paths.

When --filter-file-path is relative, it is always relative to the current working directory, even if a --repository-path is provided

This table covers al supported cases:

Repository Path Filter File Path Expected Repository Path Expected Filter File Path
/home/lchaia/dotnet-affected "" /home/lchaia/dotnet-affected null
"" /home/lchaia/dotnet-affected/Affected.sln /home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/Affected.sln
/home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/subdirectory/other/Affected.sln /home/lchaia/dotnet-affected /home/lchaia/dotnet-affected/subdirectory/other/Affected.sln
"" "" Environment.CurrentDirectory null
"" Affected.sln Environment.CurrentDirectory Path.Join(Environment.CurrentDirectory, "Affected.sln")
/home/lchaia/dotnet-affected Affected.sln /home/lchaia/dotnet-affected Path.Join(Environment.CurrentDirectory, "Affected.sln")

Fixes #105

@leonardochaia leonardochaia merged commit 60dd23b into main Nov 12, 2024
@leonardochaia leonardochaia deleted the fixes/filter-file-path-relative-support branch November 12, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

filter-file-path does not work with relative paths

2 participants