during the investigation of a previous bug report, which unfortunately got closed immediately , I found out what caused the crashing of vim.exe if run from cmd.exe: It was the fact the cmd.exe generally does not define the HOME variable.
1) If I open cmd.exe, and run vim.exe, it crashes.
2) If I open cmd.exe again, run "set HOME=." (i.e. set the HOME variable to at least something) and then run vim.exe, it works.
3) If I close vim.exe, run "set HOME=" (i.e. reset to an empty HOME variable) and then run vim.exe, it crashes again.
What I still don't understand is, if I run bash and reset the HOME variable inside bash and then run vim, it works. :/
However, I have found out that "HOME" is missing in the list of variables "forced_winenv_vars" in source\winsup\cygwin\environ.cc. Simply adding it there does not help, though, but I believe that a whole bunch of problems regarding running MSYS programs in cmd.exe could be solved if the HOME variable would be set to at least something sane (maybe ".", setting it to USERPROFILE might involve directory names with spaces in them) if it is found empty from the enrironment which it was called from. I know it is not your priority to make MSYS programs work from cmd.exe, but I believe fixing this won't hurt anyone. ;)
Log in to post a comment.