mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix redundant '--python' warning on Windows
This commit is contained in:
+7
-9
@@ -344,15 +344,13 @@ def do_create_virtualenv(three=None, python=None):
|
||||
# Pass a Python version to virtualenv, if needed.
|
||||
if python:
|
||||
click.echo('{0} {1} {2}'.format(crayons.yellow('Using'), crayons.red(python), crayons.yellow('to create virtualenv...')))
|
||||
elif three is False:
|
||||
python = 'python2'
|
||||
elif three is True:
|
||||
python = 'python3'
|
||||
|
||||
# Windows!
|
||||
if os.name == 'nt':
|
||||
click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python')))
|
||||
|
||||
else:
|
||||
if os.name == 'nt':
|
||||
click.echo('{0} If you are running on Windows, you should use the {1} option instead.'.format(crayons.red('Warning!'), crayons.green('--python')))
|
||||
if three is False:
|
||||
python = 'python2'
|
||||
elif three is True:
|
||||
python = 'python3'
|
||||
if python:
|
||||
cmd = cmd + ['-p', python]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user