mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
@@ -3,4 +3,4 @@
|
||||
# //___/ / / / //___/ / // // / / || / /
|
||||
# // / / // ((____ // / / ||/ /
|
||||
|
||||
__version__ = '5.4.1'
|
||||
__version__ = '5.4.2'
|
||||
|
||||
+6
-2
@@ -1058,8 +1058,6 @@ def shell(three=None, python=False, compat=False, shell_args=None):
|
||||
code = compile(f.read(), activate_this, 'exec')
|
||||
exec(code, dict(__file__=activate_this))
|
||||
|
||||
print(locals())
|
||||
|
||||
# Set an environment variable, so we know we're in the environment.
|
||||
os.environ['PIPENV_ACTIVE'] = '1'
|
||||
|
||||
@@ -1142,6 +1140,12 @@ def run(command, args, three=None, python=False):
|
||||
|
||||
command_path = which(command)
|
||||
|
||||
# Activate virtualenv under the current interpreter's environment
|
||||
activate_this = which('activate_this.py')
|
||||
with open(activate_this) as f:
|
||||
code = compile(f.read(), activate_this, 'exec')
|
||||
exec(code, dict(__file__=activate_this))
|
||||
|
||||
if not os.path.exists(command_path):
|
||||
click.echo(crayons.red('The command ({0}) was not found within the virtualenv!'.format(command_path)))
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user