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

pipenv init subcommand #2642

Closed
dankeder opened this issue Jul 24, 2018 · 3 comments
Closed

pipenv init subcommand #2642

dankeder opened this issue Jul 24, 2018 · 3 comments

Comments

@dankeder
Copy link

Is your feature request related to a problem? Please describe.

When I run pipenv install <somepackage> in a directory where the Pipfile doesn't exist yet pipenv automatically creates the Pipfile. While this is convenient, sometimes I accidentally run it in a wrong directory. After that happens I have to manually remove both Pipenv & Pipenv.lock.

Describe the solution you'd like

To prevent the mistakes like the one described above, I propose this:

  1. Introduce a pipenv subcommand init:
pipenv init     # Create the initial Pipfile and/or Pipfile.lock in the current directory
pipenv install <somepackage>     # Install packages as usual
  1. Modify the subcommand inistall so that it doesn't create Pipfile automatically; if the command is issued and Pipfile doesn't exist in the current directory or in one of the parent directories, print a message and exit. The message may contain a hint that the user should first run pipenv init.

Also, there are other well-known tools that work in a similar fashion, for example git or vagrant.

@uranusjr
Copy link
Member

uranusjr commented Jul 24, 2018

Duplicate to #426 #2188.

For the record I am in favour of this feature, but as the issue template says, be sure to check the existing issues. Please be considerate and avoid posting duplicates.

@dankeder
Copy link
Author

Sorry about that, I checked (really) but my search query didn't yield these two issues... I guess I'll try harder next time. Thanks!

@uranusjr
Copy link
Member

uranusjr commented Jul 24, 2018

@dankeder Pro tip: GitHub search is terrible, use Google instead :p (use something like pipenv github <your keywords>)

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

No branches or pull requests

2 participants