Skip to content

Commit

Permalink
wip: what the heck is the error type from actions... again
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbunni committed Dec 4, 2024
1 parent 22c858c commit dc83032
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 @@ -77,11 +77,12 @@ func sourceFromArg(arg string) (*source, error) {

// a GitHub or GitLab URL (even without the protocol):
var dnsErr *net.DNSError
var opErr *net.OpError
src, err := readmeURL(arg)
if src != nil && err == nil {
// if there's an error, try next methods...
return src, nil
} else if err != nil && errors.As(err, &dnsErr) {
} else if err != nil && errors.As(err, &dnsErr) || errors.As(err, &opErr) {
// fail if there's a network error.
return src, err
}
Expand Down

0 comments on commit dc83032

Please sign in to comment.