Skip to content

Commit

Permalink
closes #1
Browse files Browse the repository at this point in the history
Moist-Cat committed Sep 7, 2022
1 parent 994ed62 commit 31909ba
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@

setuptools.setup(
name="port_env",
version="0.0.2",
version="0.0.3",
author="Moist-Cat",
author_email="moistanonpy@gmail.com",
description="Make environments portable",
7 changes: 6 additions & 1 deletion src/port_env/command.py
Original file line number Diff line number Diff line change
@@ -34,6 +34,10 @@ def _old_env(activate_path: Path) -> Path:
out = exc_cmd("awk", r'BEGIN {FS="\x3D"} /^VIRTUAL_ENV/ {print $2}', activate_path)

old_env = Path(out.strip().strip('"').strip("'"))
# see https://github.com/Moist-Cat/port_env/issues/1
# we are getting old/path/env
# we want old/path -- the root
old_env = old_env.parent

assert old_env, "There is no VIRTUAL_ENV variable in your activate script."

@@ -93,7 +97,8 @@ def fix_third_party(path, _test=False):

def fix_env(path: Path):
"""Wrapper. Gets the old env and globally replaces it by the new one"""
new_env = path.absolute()
# see #1
new_env = path.absolute().parent
bin_path = path / "bin"
activate_path = bin_path / "activate"

0 comments on commit 31909ba

Please sign in to comment.