`pipenv run` consumes flags anywhere in command line
See original GitHub issue0 $ pipenv run foo
The command (/home/josh/.local/share/virtualenvs/[redacted]/bin/foo) was not found within the virtualenv!
0 $ pipenv run foo --bar
The command (/home/josh/.local/share/virtualenvs/[redacted]/bin/foo) was not found within the virtualenv!
0 $ pipenv run foo --help
Usage: pipenv run [OPTIONS] COMMAND [ARGS]...
Spawns a command installed into the virtualenv.
Options:
--three / --two Use Python 3/2 when creating virtualenv.
--python TEXT Specify which version of Python virtualenv should use.
--help Show this message and exit.
Instead, help text should only be printed if invoked with --help
as first argument to run
(i.e. pipenv run --help
) – even if a flag after the first argument to run
is recognised as a pipenv flag, it should be passed to the program being run. IOW, pipenv run my_program --my-flag
should always run my_program --my-flag
, even if pipenv someday learns to recognise --my-flag
.
Similarly with other options, not just --help
:
$ pipenv run foo --python
Error: --python option requires an argument
(message is from pipenv, since foo
binary doesn’t exist)
Finally, pipenv run foo --three
(or --two
) removes the virtualenv automatically and creates a new one!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Advanced Usage of Pipenv - Read the Docs
To reuse Conda–installed Python packages, use the --site-packages flag: ... You can then run pipenv run <shortcut name> in your terminal to run...
Read more >pipenv Documentation - Read the Docs
Pipenv uses a set of commands to manage your Project's dependencies and custom ... Command line flags (e.g. --python and --three) are prioritized...
Read more >Advanced Usage of Pipenv — pipenv 11.7.2 documentation
To reuse Conda–installed Python packages, use the --site-packages flag: ... command to install dependencies install: "make" # command to run tests script: ...
Read more >Pipenv: A Guide to the New Python Packaging Tool
lock (which enables deterministic builds). Pipenv uses pip and virtualenv under the hood but simplifies their usage with a single command line interface....
Read more >pipenv Documentation - manpages.ubuntu!
Managing a requirements.txt file can be problematic, so Pipenv uses the ... because this command is intended to be run in a shell...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use
--
to signify the end of the options and pass arguments to the spawned command.cf. http://click.pocoo.org/5/arguments/#option-like-arguments
@techalchemy oh, thanks! Sorry for the noise 😃