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

Commitde5e57c

Browse files
committed
check for the existence/execute bit on the uname command before trying to run it
1 parentec00872 commitde5e57c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎git/util.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,13 @@ def _is_cygwin_git(git_executable: str) -> bool:
463463
git_dir=osp.dirname(res[0])ifreselse""
464464

465465
# Just a name given, not a real path.
466+
# Let's see if the same path has uname
466467
uname_cmd=osp.join(git_dir,"uname")
468+
ifnot (osp.isfile(uname_cmd)andos.access(uname_cmd,os.X_OK)):
469+
_logger.debug(f"File{uname_cmd} either does not exist or is not executable.")
470+
_is_cygwin_cache[git_executable]=is_cygwin
471+
returnis_cygwin
472+
467473
process=subprocess.Popen([uname_cmd],stdout=subprocess.PIPE,universal_newlines=True)
468474
uname_out,_=process.communicate()
469475
# retcode = process.poll()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp