eis
eis

Reputation: 53462

Path issue with python script in git shell

I'm trying to use script https://github.com/charleso/git-cc. You can see the troublesome part there, it's in common.py.

Operating system is windows 7. Using git shell, as instructed in the readme. Executing:

gitcc init /c/clearcase/myview/vob/

or

gitcc init c:/clearcase/myview/vob/

fails with:

  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

If I turn on DEBUG, it tells me it is trying to run "git branch". I have verified os.environ contains correct path and "git" is in that path. Using os.environ in the "env" variable still made no difference. "git" and "git branch" work fine executing from the shell. What am I doing wrong?

Upvotes: 0

Views: 862

Answers (1)

eis
eis

Reputation: 53462

Ok, running it from cygwin bash shell resolved the issue and it run out fine. I should've maybe guessed git bash (mingw system) doesn't play that well with cygwin.

Upvotes: 1

Related Questions