Skip to content

Commit

Permalink
Fix path of knownhosts file
Browse files Browse the repository at this point in the history
  • Loading branch information
macdylan committed Apr 17, 2023
1 parent f5ae9f1 commit 79940b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ func main() {
}()

// 获取程序所在目录
dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
ex, _ := os.Executable()
dir, err := filepath.Abs(filepath.Dir(ex))
if err != nil {
log.Panicln(err)
}
Expand Down

0 comments on commit 79940b9

Please sign in to comment.