Skip to content
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

always make paths absolute before processing files #6293

Merged
merged 4 commits into from
Sep 8, 2024

Conversation

Kanti
Copy link
Contributor

@Kanti Kanti commented Sep 6, 2024

The path is currently only an absolute path if you call rector with a directory like this
rector process pathToFile/.
If you call it with a filename instead, the path will be relative.
rector process pathToFile/File.php.
This makes implementing RectorRules with path usage more difficult than necessary.

fixes: sabbelasichon/typo3-rector#4301

@Kanti Kanti force-pushed the always-absolute-path branch 2 times, most recently from 4a95676 to f8987f2 Compare September 6, 2024 12:07
@samsonasik
Copy link
Member

Thank you @Kanti

@samsonasik samsonasik enabled auto-merge (squash) September 8, 2024 01:24
@samsonasik samsonasik merged commit 393423f into rectorphp:main Sep 8, 2024
36 checks passed
@Kanti Kanti deleted the always-absolute-path branch September 8, 2024 06:05
@TomasVotruba
Copy link
Member

Thanks 👍

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.

[BUG]: FilesystemInterface prefix (if file is selected instead of path)
3 participants