Skip to content

Should exit non-zero on DNS or other error #26

@prenagha

Description

@prenagha

Was expecting to get a non-zero exit code if reader cannot get the http page, but it always returns zero.

Example shows curl return non-zero on invalid domain name

> curl https://notfound555.cnn.com ; echo $?
curl: (6) Could not resolve host: notfound555.cnn.com
6

But reader seems to always return 0

> reader https://notfound555.cnn.com ; echo $?
Request returned a Syscall Error: lookup notfound555.cnn.com: no such host-> Get
"https://notfound555.cnn.com": dial tcp: lookup notfound555.cnn.com: no such host
0

I would like a reliable way to know if reader worked, so was trying to use the exit code to do that.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions