Skip to content

Commit

Permalink
Update symlink to use env_hash instead of env_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
elikoga committed May 7, 2024
1 parent 227a08b commit c67fc61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/appenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def prepare(self, args=None, remaining=None):
os.unlink(current_path)
except FileNotFoundError:
pass
os.symlink(env_dir, current_path)
os.symlink(env_hash, current_path)

self.env_dir = env_dir

Expand Down
3 changes: 2 additions & 1 deletion tests/test_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ def test_prepare_creates_venv_symlink(workdir, monkeypatch):
env.update_lockfile()
env.prepare()
assert os.path.islink(os.path.join(env.appenv_dir, "current"))
assert os.readlink(os.path.join(env.appenv_dir, "current")) == env.env_dir
assert (os.path.realpath(os.path.join(
env.appenv_dir, "current")) == os.path.realpath(env.env_dir))

0 comments on commit c67fc61

Please sign in to comment.