Skip to content

Commit

Permalink
Check file of sshConfig: exists
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Feb 14, 2023
1 parent e9e8967 commit 1c0a345
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions book.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ func (bk *book) parseSSHRunnerWithDetailed(name string, b []byte) (bool, error)
if !strings.HasPrefix(c.SSHConfig, "/") {
p = filepath.Join(root, c.SSHConfig)
}
if _, err := os.Stat(p); err != nil {
return false, err
}
opts = append(opts, sshc.ClearConfigPath(), sshc.ConfigPath(p))
}
if c.Hostname != "" {
Expand Down

0 comments on commit 1c0a345

Please sign in to comment.