GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — check for the existence/execute bit on the uname command before tryin… · gitpython-developers/GitPython@de5e57c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • git
    • util.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/util.py‎

Copy file name to clipboardExpand all lines: git/util.py
+6Lines 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]) if res else ""
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+
if not (osp.isfile(uname_cmd) and os.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+
return is_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 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.