I am using fish via Cygwin on Windows 10; whenever I try to install OMF, I am presented with this error:

curl -L https://get.oh-my.fish | fish.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    194      0  0:00:01 --:--:--  0:00:01  2487
100 19025  100 19025    0     0  19025      0  0:00:01  0:00:01 --:--:-- 13379
Checking for a sane environment...
Install aborted: /cygdrive/c/Program Files/Git/cmd/git is Git for Windows which is not supported.

It implies that Git for Windows is not supported by OMF, but surely this isn't the case because I have seen several posts on GitHub that begin with something along the lines of:

After installing OMF on my Windows machine...

which implies that the installation was successful and thus can be achieved.

Is there a resolution to this?

  • You could put Cygwin Git in your PATH first. – slhck Nov 22 at 14:16
  • How do I do that? As in, I know how to add things to my PATH - what I want to know is how to specifically put Cygwin Git in my PATH. I'm running Cygwin setup again and am now adding the git packages that way. Is that the right approach? Also, I'm not sure if it's relevant, but I already use Git through Cygwin/fish. – SnookerFan Nov 22 at 14:23
  • The Git you are using is the one installed with the Git for Windows installer. When you install Git via Cygwin, you will get another git executable (probably at /usr/bin/git or somewhere similar). Which one you use for your daily work does not really matter. They may just differ in terms of functionality. You may even continue using the Windows Git; but for the installation of oh-my-fish, you could probably override the path temporarily, so that it'll continue. – slhck Nov 22 at 15:22
  • PS: From my own experience, having a mix of Cygwin and Windows executables (Git, Python) is a little bit confusing but manageable. Just make sure you know which one you are calling. – slhck Nov 22 at 15:23
  • Thank you for the comments. I finished installing the Git packages via Cygwin and it worked! – SnookerFan Nov 22 at 16:50

The Git you are using is the one installed with the Git for Windows installer.

When you install Git via Cygwin, you will get another git executable. Which one you use for your daily work does not really matter. They may just differ in terms of functionality or compatibility (e.g., the Windows Git comes with some shell extensions for Windows Explorer).

Once you have installed Git via the Cygwin installer, check your Git executables:

which -a git

This will list the order of preference. For the installation of oh-my-fish, make sure that Cygwin Git comes first (/usr/bin/git), so that it'll continue with the installation.

You can then switch back to whatever Git you want to use for your daily work by overriding the path, e.g. by adding this to your shell profile:

export PATH="/cygdrive/c/Program Files/Git/cmd/:$PATH"
  • This is helpful, thank you. As per my comment in the original question, I finished installing Git via Cygwin and it now works. I ran which -a git and got this (I have denote a new line with ;): /bin/git; /usr/bin/git; /cygdrive/c/Program Files/Git/cmd/git. However, after installing OMF, it significantly slowed down the CLI, so I have removed it for now but will look into why that happened another time. – SnookerFan Nov 23 at 9:19
  • Thanks for the additional info. I don't have Windows to test here. If this answer solved your problem, I'd appreciate if you marked it as accepted. – slhck Nov 23 at 14:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.