Skip to content

Commit

Permalink
Update environment.py
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius authored Sep 23, 2024
1 parent 146be17 commit 31edd00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pipenv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import site
import sys
import typing
from collections import namedtuple
from functools import cached_property
from pathlib import Path
from sysconfig import get_paths, get_python_version, get_scheme_names
Expand Down Expand Up @@ -797,7 +796,7 @@ def activated(self):
and not self.prefix.exists()
or not hasattr(self, "prefix")
):
yield self.EnvironmentActivationResult(ok=False)
yield False
return

original_path = sys.path
Expand Down Expand Up @@ -825,7 +824,8 @@ def activated(self):
sys.path = self.sys_path
sys.prefix = self.sys_prefix
try:
yield self.EnvironmentActivationResult(ok=True)
yield True
finally:
sys.path = original_path
sys.prefix = original_prefix

0 comments on commit 31edd00

Please sign in to comment.