Skip to content

fix(predictions): normalize paths outside of project dir #94

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

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

leonardochaia
Copy link
Owner

dotnet-affected works by comparing the output of git diff with the output of MSBuild.Predictions.
Basically, it needs to match the files that have changed with the files that are owned by each MSBuild Project.

For the comparison to works, paths must be normalized, we use Path.GetFullPath to do so.

This pr fixes the normalization of referencing paths outside of the project directory. The normalization was being done for relative paths only, this PR takes care of fixing it.

Fixes #93

@leonardochaia
Copy link
Owner Author

@marcusber this should fix the issue you are experiencing, would you kindly confirm?

@marcusber
Copy link

@leonardochaia Works as expected! Thank you!

@leonardochaia leonardochaia merged commit cfdb3a6 into main Sep 26, 2024
3 checks passed
@leonardochaia leonardochaia deleted the fixes/predicted-path-normalization branch September 26, 2024 14: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.

Failed to resolve relative file include.
2 participants