mardi 24 février 2015

How to invoke git editor from outside of git on Windows?

I'm trying to invoke the git editor from a python script by calling subprocess.call([editor, filename]) on Windows.


When I call git commit on powershell, it opens \AppData\Local\Programs\Git\share\vim\vim74\vim.exe. However, I don't have an EDITOR environment variable, git var GIT_EDITOR outputs vi instead of vim or ``vim.exe, and the directory is not in my PATH. So somewhere, git figures out it has to open that vim.exe.


What's the easiest way to find where it's getting that information from? Are there any other environment variables I can use?


Aucun commentaire:

Enregistrer un commentaire