more on windows/cygwin

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-06-13 20:29:29 -07:00
parent db4ffc0fa9
commit 437afc794c
1 changed files with 2 additions and 1 deletions

3
ssh.go
View File

@ -27,10 +27,11 @@ func SSH(hostname string, port int, username string, pass string) *ssh.Session {
keyfile := user.HomeDir + "/.ssh/id_ed25519" keyfile := user.HomeDir + "/.ssh/id_ed25519"
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
if Exists("/cygwin") { if Exists("/cygdrive") {
log.Println("On Windows, but running within cygwin") log.Println("On Windows, but running within cygwin")
keyfile = "/home/wit/.ssh/id_ed25519" keyfile = "/home/wit/.ssh/id_ed25519"
} else { } else {
log.Println("On Windows: (but not cygwin)")
keyfile = user.HomeDir + "\\id_ed25519" keyfile = user.HomeDir + "\\id_ed25519"
} }
} }