Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git shell中python脚本的路径问题_Python_Git_Cygwin_Mingw - Fatal编程技术网

git shell中python脚本的路径问题

git shell中python脚本的路径问题,python,git,cygwin,mingw,Python,Git,Cygwin,Mingw,我正在尝试使用脚本。你可以在那里看到麻烦的部分,它在里面 操作系统是Windows7。按照自述文件中的说明,使用git shell。 执行: gitcc init /c/clearcase/myview/vob/ 或 在以下情况下失败: File "/cygdrive/c/versioncontrol/git-cc/common.py", line 47, in git_exec return popen('git', cmd, GIT_DIR, **args) File "/

我正在尝试使用脚本。你可以在那里看到麻烦的部分,它在里面

操作系统是Windows7。按照自述文件中的说明,使用git shell。 执行:

gitcc init /c/clearcase/myview/vob/

在以下情况下失败:

  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分支”。我已经验证了os.environ包含正确的路径,并且“git”在该路径中。在“env”变量中使用os.environ仍然没有任何区别。“git”和“git分支”在shell中运行良好。我做错了什么?

好的,从cygwin bash shell运行它解决了问题,并且运行良好。我应该猜到Git BASH(MIWW系统)与CygWin不太好。

Git Bash是CiggWin的一种味道。我相信,如果你考虑CygWin的明文味道(它最初是从那里分叉的),那么是的。总之,他们彼此都不喜欢:)
  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