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

--cache-dir does not support relative paths to non-existent directory #7541

Closed
sbidoul opened this issue Jan 2, 2020 · 0 comments · Fixed by #7542
Closed

--cache-dir does not support relative paths to non-existent directory #7541

sbidoul opened this issue Jan 2, 2020 · 0 comments · Fixed by #7542
Labels
auto-locked Outdated issues that have been locked by automation C: cache Dealing with cache and files in it !release blocker Hold a release until this is resolved type: bug A confirmed bug or unintended behavior
Milestone

Comments

@sbidoul
Copy link
Member

sbidoul commented Jan 2, 2020

Environment

  • pip version: 19.3, master
  • Python version: N/A
  • OS: N/A

Description

When running pip install --cache-dir=cache one expects pip to use $PWD/cache as cache directory. It works when the directory exists but not when it does not exist yet.

With pip 19.3, we get a warning about the cache directory not being writable, but the cache directory is created anyway.

With pip master, we get the warning and the cache is not created (following the fix for #7488). Providing an absolute directory for --cache-dir works correctly.

Expected behavior

When the cache directory does not exist, it should be created without warning.

How to Reproduce

pip install --cache-dir=cache flit.

With pip master, notice the cache directory is not created.

pip install --cache-dir=$PWD/cache flit.

With pip master, notice the cache directory is created correctly.

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jan 2, 2020
@sbidoul sbidoul added the type: bug A confirmed bug or unintended behavior label Jan 2, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jan 2, 2020
@sbidoul sbidoul added this to the 20.0 milestone Jan 2, 2020
@pradyunsg pradyunsg added the !release blocker Hold a release until this is resolved label Jan 2, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 2, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 2, 2020
@sbidoul sbidoul added the C: cache Dealing with cache and files in it label Jan 2, 2020
sbidoul added a commit to sbidoul/pip that referenced this issue Jan 8, 2020
deepak1725 pushed a commit to deepak1725/pip that referenced this issue Jan 20, 2020
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Feb 17, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: cache Dealing with cache and files in it !release blocker Hold a release until this is resolved type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants