Skip to content

Commit

Permalink
fix: do not hard-error if included file does not exist (#170)
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 authored Mar 31, 2023
1 parent fe5736c commit 07e1934
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sshconfig/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sshconfig

import (
"bytes"
"errors"
"fmt"
"io"
"net"
Expand Down Expand Up @@ -222,6 +223,9 @@ func parseInternal(r io.Reader) (*hostinfoMap, error) {
}
included, err := parseFileInternal(path)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
continue
}
return nil, err
}
infos.set(name, info)
Expand Down

0 comments on commit 07e1934

Please sign in to comment.