Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two remaining Windows untrusted search path cases #1792

Merged
merged 16 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify comment in test_hook_uses_shell_not_from_cwd
EliahKagan committed Jan 9, 2024
commit 15ebb258d4eebd9bf0f38780570d57e0b968b8de
6 changes: 3 additions & 3 deletions test/test_index.py
Original file line number Diff line number Diff line change
@@ -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))