github / GitPad

Notepad.exe as Git commit editor
MIT License
187 stars 69 forks source link

Editor cannot be launched when profile directory contains space? #29

Closed JosKrause closed 9 years ago

JosKrause commented 9 years ago

console

I installed GitPad by launching it, it reported no problems, then when opening a command prompt and typing git ec the message shown above appears.

It seems to barf on the fact that my user directory contains a space? I performed these steps on Windows 10 if that makes a difference. I can see that the program is converting the backslash to a forward slash; though I am not sure why I assume this is with good reason, but it still presents me with the error above.

Am I missing something obvious here? :\

haacked commented 9 years ago

I'm betting that's a legit bug, looking at the code.

haacked commented 9 years ago

But just to be sure, git ec is a custom alias, right? Could you post what it is here?

haacked commented 9 years ago

Hmm, I'm surprised that Git isn't quoting the path it's passing to the editor. Seems like a Git bug to me. I haven't tried this with Git 2.5 yet.

haacked commented 9 years ago

Ok, I was looking at the wrong thing. We can fix this in GitPad, but the easy thing to do is just install and run GitHub Desktop (https://desktop.github.com/) and it'll set up GitPad correctly. :smile:

haacked commented 9 years ago

Ok, for a quicker fix, go to the environment variables editor in Control Panel (I hit the Windows key then type "Edit Environment" and the first item should be it).

In the section "User variables for Jos Krause" scroll down till you find "EDITOR" and make sure the value has the correct path to GitPad.exe.

I'll submit a PR to fix GitPad soon.

JosKrause commented 9 years ago

The EDITOR path is set correct, with or without quotes it does not seem to matter.

Just to make sure my memory is not failing me here, would I need to reboot for those changes to take effect?