Skip to content

Commit

Permalink
Merge pull request #68 from huyangcheng/huyangcheng-patch-1
Browse files Browse the repository at this point in the history
fix windows path splicing
  • Loading branch information
yinheli committed Oct 10, 2023
2 parents 8e67b4e + 6496966 commit 1068d08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net"
"os"
"os/user"
"path"
"path/filepath"
"strconv"
"strings"
"syscall"
Expand Down Expand Up @@ -57,7 +57,7 @@ func genSSHConfig(node *Node) *defaultClient {

var pemBytes []byte
if node.KeyPath == "" {
pemBytes, err = ioutil.ReadFile(path.Join(u.HomeDir, ".ssh/id_rsa"))
pemBytes, err = ioutil.ReadFile(filepath.Join(u.HomeDir, ".ssh/id_rsa"))
} else {
pemBytes, err = ioutil.ReadFile(node.KeyPath)
}
Expand Down

0 comments on commit 1068d08

Please sign in to comment.