Skip to content

Commit

Permalink
Clarify comment in test_hook_uses_shell_not_from_cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Jan 9, 2024
1 parent f44524a commit 15ebb25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,9 @@ def test_hook_uses_shell_not_from_cwd(self, rw_dir, case):
# architecture, and generating one in a bespoke way may cause virus scanners to
# give a false positive. So we use a Bash/Python polyglot for the hook and use
# the Python interpreter itself as the bash.exe impostor. But an interpreter
# from a venv may not run outside of it, and a global interpreter won't run from
# a different location if it was installed from the Microsoft Store. So we make
# a new venv in rw_dir and use its interpreter.
# from a venv may not run when copied outside of it, and a global interpreter
# won't run when copied to a different location if it was installed from the
# Microsoft Store. So we make a new venv in rw_dir and use its interpreter.
venv = VirtualEnvironment(rw_dir, with_pip=False)
shutil.copy(venv.python, Path(rw_dir, shell_name))
shutil.copy(fixture_path("polyglot"), hook_path("polyglot", repo.git_dir))
Expand Down

0 comments on commit 15ebb25

Please sign in to comment.