github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/ssh/ssh_windows.go (about)

     1  package ssh
     2  
     3  import (
     4  	"github.com/mutagen-io/mutagen/pkg/platform"
     5  )
     6  
     7  // commandSearchPaths specifies locations on Windows where we might find ssh.exe
     8  // and scp.exe binaries.
     9  var commandSearchPaths = []string{
    10  	`C:\Program Files\Git\usr\bin`,
    11  	`C:\Program Files (x86)\Git\usr\bin`,
    12  	`C:\msys32\usr\bin`,
    13  	`C:\msys64\usr\bin`,
    14  	`C:\cygwin\bin`,
    15  	`C:\cygwin64\bin`,
    16  	`C:\Windows\System32\OpenSSH`,
    17  }
    18  
    19  // sshCommandPathForPlatform will search for a suitable ssh command on Windows.
    20  func sshCommandPathForPlatform() (string, error) {
    21  	return platform.FindCommand("ssh", commandSearchPaths)
    22  }
    23  
    24  // scpCommandPathForPlatform will search for a suitable scp command on Windows.
    25  func scpCommandPathForPlatform() (string, error) {
    26  	return platform.FindCommand("scp", commandSearchPaths)
    27  }