coreh / hookshot

Hookshot is a tiny library and companion CLI tool for handling GitHub post-receive hooks.
MIT License
145 stars 24 forks source link

Doesn't work on Windows #1

Closed TooTallNate closed 11 years ago

TooTallNate commented 11 years ago

Since you're assuming that process.env.SHELL is set, which may or may not be the case on Windows.

But if/when it is available on Windows, then it's usually a unix-style path such as /bin/bash. This path isn't gonna work on Windows' cp.spawn() and will result in a error spawn ENOENT error.

Some possible (combinations of) solutions:

  1. Just use cmd.exe on Windows.
  2. Detect when we are running from within a "cygwin" environment and conver the "SHELL" env variable to a cygwin path. This should be relatively easy.
  3. This would only really leave detecting git-bash and its path resolution, but that's not really important for us ATM.

I'll probably try to whip up a patch for 1+2.

TooTallNate commented 11 years ago

Basically works now :dancers: