Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0cd8a8

Browse files
committed
Clarify comment on shell case in _safer_popen_windows
1 parent9b5531b commitc0cd8a8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎git/cmd.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,10 @@ def _safer_popen_windows(
250250
# When not using a shell, the current process does the search in a CreateProcessW
251251
# API call, so the variable must be set in our environment. With a shell, this is
252252
# unnecessary, in versions where https://github.com/python/cpython/issues/101283 is
253-
# patched. If not, in the rare case the ComSpec environment variable is unset, the
254-
# shell is searched for unsafely. Setting NoDefaultCurrentDirectoryInExePath in all
255-
# cases, as here, is simpler and protects against that. (The "1" can be any value.)
253+
# patched. If that is unpatched, then in the rare case the ComSpec environment
254+
# variable is unset, the search for the shell itself is unsafe. Setting
255+
# NoDefaultCurrentDirectoryInExePath in all cases, as is done here, is simpler and
256+
# protects against that. (As above, the "1" can be any value.)
256257
withpatch_env("NoDefaultCurrentDirectoryInExePath","1"):
257258
returnPopen(
258259
command,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp