Pipenv will pollute my filesystem with Pipfiles
See original GitHub issueIs your feature request related to a problem? Please describe.
We have started using pipenv
in our project and its great. But it has a tendency to pollute my filesystem with Pipfiles
if I do not pay close attention to where I am issuing my commands.
If I am in a directory whose parents do not have Pipfiles
, pipenv
will simply create a new one no matter what command I issue. This is contrary to what I would expect and definitely contrary to other tools do such as git
.
Describe the solution you’d like
For instance git
will not start a git repo because I simply issued git status
on a non-tracked directory, rather it issues an error:
fatal: not a git repository (or any of the parent directories): .git
Now I would expect pipenv
to do something similar and only create a Pipfile
once I initialise a given repository.
Second and related to the above problem, git
has a very useful option git -C <path>
which will run as if git was started in path
instead of the current working directory. Although pipenv
has the PIPENV_PIPFILE
, it is not as useful and concise as -C
. See a related discussion about git
in here.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top GitHub Comments
A good way to approach this would be to lay out stages a project should go through from uninitialised (say, a fresh
git clone
) to fully ready to be executed. Each command can then be inspected from this perspective, to compile a table of what each should be doing if used at a given stage, and what stage the command should take the project into.I didn’t want to appear to dump a pile of complaints, I just wanted to provide some feedback, although I might have gone a bit overboard with the examples.
There are 3 possible behaviors I can think for a command that needs a Pipfile when there’s no Pipfile.
pipenv --where
does currently.pipenv graph
would return nothing. I don’t know if there’s a command that currently works like this.I’m not sure how this should be focused. Maybe an issue for every command with a behavior that should be revised?