Skip to content

Commit

Permalink
run --two/--three arg, regardless of subcommands
Browse files Browse the repository at this point in the history
  • Loading branch information
nateprewitt committed Apr 12, 2017
1 parent 74d19e2 commit 7b17058
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pipenv/cli.py
Expand Up @@ -751,13 +751,14 @@ def cli(ctx, where=False, venv=False, rm=False, bare=False, three=False, python=
click.echo(crayons.red('No virtualenv has been created for this project yet!'), err=True)
sys.exit(1)

# --two / --three was passed...
if python or three is not None:
ensure_project(three=three, python=python)

else:
# Display help to user, if no commands were passed.
click.echo(format_help(ctx.get_help()))
# --two / --three was passed...
if python or three is not None:
ensure_project(three=three, python=python)

# Check this again before exiting for empty ``pipenv`` command.
elif ctx.invoked_subcommand is None:
# Display help to user, if no commands were passed.
click.echo(format_help(ctx.get_help()))


@click.command(help="Installs provided packages and adds them to Pipfile, or (if none is given), installs all packages.")
Expand Down

0 comments on commit 7b17058

Please sign in to comment.