git-sh中python脚本的路径问题

2024-04-26 10:53:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用脚本https://github.com/charleso/git-cc。你可以在那里看到麻烦的部分,在common.py。在

操作系统为Windows7。按照自述文件中的说明使用gitshell。 正在执行:

gitcc init /c/clearcase/myview/vob/

或者

^{pr2}$

失败原因:

  File "/cygdrive/c/versioncontrol/git-cc/common.py", line 47, in git_exec
    return popen('git', cmd, GIT_DIR, **args)
  File "/cygdrive/c/versioncontrol/git-cc/common.py", line 57, in popen
    pipe = Popen(cmd, cwd=cwd, stdout=PIPE, stderr=PIPE, env=env)
  File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

如果我打开DEBUG,它会告诉我它正在尝试运行“git branch”。我已经核实过了操作系统环境包含正确的路径,“git”在该路径中。使用操作系统环境在“env”变量中仍然没有任何区别git”和“git branch”可以从shell执行。我做错什么了?在


Tags: inpygitenvcmdinitlinecommon