--cache-dir does not support relative paths to non-existent directory #7541
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
Environment
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.
The text was updated successfully, but these errors were encountered: