[Cygwin] 'up' ... not able to execute
sverhagen opened this issue · 7 comments
I believe I successfully installed PyGitUp:
$ pip install git-up
Collecting git-up
Using cached git-up-1.3.0.zip
Requirement already satisfied (use --upgrade to upgrade): GitPython==1.0.0 in /usr/lib/python2.7/site-packages (from git-up)
Requirement already satisfied (use --upgrade to upgrade): colorama==0.3.3 in /usr/lib/python2.7/site-packages (from git-up)
Requirement already satisfied (use --upgrade to upgrade): termcolor==1.1.0 in /usr/lib/python2.7/site-packages (from git-up)
Requirement already satisfied (use --upgrade to upgrade): docopt==0.6.2 in /usr/lib/python2.7/site-packages (from git-up)
Requirement already satisfied (use --upgrade to upgrade): six==1.9.0 in /usr/lib/python2.7/site-packages (from git-up)
Requirement already satisfied (use --upgrade to upgrade): gitdb>=0.6.4 in /usr/lib/python2.7/site-packages (from GitPython==1.0.0->git-up)
Requirement already satisfied (use --upgrade to upgrade): smmap>=0.8.5 in /usr/lib/python2.7/site-packages (from gitdb>=0.6.4->GitPython==1.0.0->git-up)
Building wheels for collected packages: git-up
Running setup.py bdist_wheel for git-up
Stored in directory: /home/sverhagen/.cache/pip/wheels/19/3b/05/ac8c235883c0b388b9376f8da07d37a5b7f147bf4a9c319002
Successfully built git-up
Installing collected packages: git-up
Successfully installed git-up-1.3.0
I did this using Run As Administrator.
I did all this in Cygwin.
Now it does not work:
$ git up
fatal: 'up' appears to be a git command, but we were not
able to execute it. Maybe git-up is broken?
Do you have any suggestions, thank you!
Seems like you didn't add the directory where pip installs executables to your $PATH
. I'm not sure where pip puts executables on Cygwin, could you check if there is a git-up.exe
is in %APPDATA%/Python/Scripts
or ~/.local/bin
? If it doesn't could you post the path to your Python interpreter?
Thank you. There is a git-up
in C:\cygwin64\bin
, and git-up
as a command works (I can just use that). There isn't any git-up.exe
on my system. I don't have $APPDATA/Python
, probably because this Python comes with Cygwin, and that might possibly also be where this all breaks down. Nor do I have a ~/.local
.
There is a git-up in C:\cygwin64\bin, and git-up as a command works (I can just use that). There isn't any git-up.exe on my system.
Do you also use Cygwin's git
? Or have you installed MSysGit/Git for Windows? It seems like git searches for an .exe
file here...
This is a standalone Git, (git version 1.9.4.msysgit.2
) used from within Cygwin. Which isn't without its problems, anyway. But just the same in a Windows Command Prompt, I get the same result:
C:\Users\sverhagen>git --version
git version 1.9.4.msysgit.2
C:\Users\sverhagen>git up
fatal: 'up' appears to be a git command, but we were not
able to execute it. Maybe git-up is broken?
There is no .exe
file because I installed it from within Cygwin? I'm not sure what the suggestion is, here?
There is no .exe file because I installed it from within Cygwin?
Exactly. The standalone Git seems to be confused by the shell script that is (I guess) installed by pip. As far as I can see the problem can be fixed by either installing Git for Cygwin or using Python for Windows. But maybe you can work around it by placing a file called git-up.bat
in your PATH with the following contents:
@echo off
python -m PyGitUp.gitup %*
This .bat
script invokes PyGitUp and passes all arguments it received. If we're lucky, Git will execute the .bat
script and not the shell script.
That doesn't work for me, but that is fine. I think the conclusion is: don't try to do this on a mixed set of Cygwin and Python and Git. The Git for Cygwin has never worked well for me, hence this mixed set. In terms of workarounds, typing git-up
works fine!
Okay, thanks for reporting the workaround!