Closed rubenhazelaar closed 8 years ago
There should be no custom make tools required. All you need is a working golang install. Docs are available at: https://golang.org/doc/install
The problem is that Stat() doesn't work for stdin on Windows. GetFileInformationByHandle() WinAPI function fails when being called with stdin argument. Here is the Stat() code: https://golang.org/src/os/stat_windows.go
As a possible solution, goos and error might be checked: goos == Windows and err != nil -> not a pipe, goos == Window and err == nil -> pipe:
Just to provide some more information. I'm running Go v1.5.2. The executable installed correctly and I can execute s puppies
, however I get the previously stated error ([Error] Failed to stat Stdin: GetFileInformationByHandle /dev/stdin: Incorrect function.
)
Give it a shot now. I think the issue is that you were using cmd.exe and not a real shell like bash/zsh through cygwin. I have put up a fix that should address your error. =)
Great, will try it ASAP. But should I use something like cygwin, can I use cmd.exe or Powershell now also? I used Powershell btw :)
Awesome! Let me know if it works! All of them should work fine now, just won't support piping in the query from another command if Stdin isn't available.
Any luck?
Works like a charm! Great!
I have some trouble installing on Windows (no make tools, newest I can find are from 2006). So I tried the built s.exe, however I get the following error:
[Error] Failed to stat Stdin: GetFileInformationByHandle /dev/stdin: Incorrect function.
Could you provide install instruction for Windows? Perhaps something to add to the README.md?