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

Parse -r and -c entries as relative to containing file #1421

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

charliermarsh
Copy link
Member

Summary

In a requirements.txt file, it turns out that the -c and -r entries should be interpreted as relative to the file in which they're declared, while the -e entries should be interpreted as relative to the current working directory, no matter where they're defined.

Previously, we always used the current working directory; now, we use the declaring file's directory for -c and -r.

Closes #1367.

Closes #1416.

@charliermarsh charliermarsh added the bug Something isn't working label Feb 16, 2024
@charliermarsh charliermarsh force-pushed the charlie/rel branch 2 times, most recently from 9ffa7c4 to 4443e50 Compare February 16, 2024 04:03

/// Resolve nested `-r` requirements files with relative paths.
#[test]
fn compile_relative_subfile() -> Result<()> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also verified that this fails on main.

@charliermarsh charliermarsh merged commit e48edf0 into main Feb 16, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/rel branch February 16, 2024 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants