ooni-probe-cli/internal/cli
Simone Basso e4ef279b80
fix(onboard): fail if input is /dev/null (#176)
When the input is /dev/null, every read returns EOF. In general, it
may also happen that read doesn't work as intended. So, the robust thing
to do here is to ensure that we check the return values. By doing that
we notice of io.EOF errors and we don't proceed with the onboarding.

This diff fixes the issue described by https://github.com/ooni/probe/issues/1281
however it may be that we also want (in the near or not-so-near future)
to stop onboarding if the input terminal is not a tty. This is however a
possible future evolution that should not prevent us for committing and
merging this simple fix that unblocks creating a Debian package.
2020-11-24 09:19:34 +01:00
..
app refactor: version is now an internal package (#167) 2020-11-13 17:37:06 +01:00
geoip feat(geoip, info): write comprehensive unit tests 2020-11-20 12:19:51 +01:00
info feat(geoip, info): write comprehensive unit tests 2020-11-20 12:19:51 +01:00
list refactor(ooni): introduce interfaces for testability 2020-11-20 12:19:51 +01:00
onboard fix(onboard): fail if input is /dev/null (#176) 2020-11-24 09:19:34 +01:00
reset refactor(ooni): introduce interfaces for testability 2020-11-20 12:19:51 +01:00
rm refactor(ooni): introduce interfaces for testability 2020-11-20 12:19:51 +01:00
root feat(geoip, info): write comprehensive unit tests 2020-11-20 12:19:51 +01:00
run refactor(ooni): introduce interfaces for testability 2020-11-20 12:19:51 +01:00
show refactor(ooni): introduce interfaces for testability 2020-11-20 12:19:51 +01:00
upload Write to output when a function is not implemented 2018-06-25 13:19:54 +02:00
version refactor: run go fmt ./... (#169) 2020-11-13 18:42:10 +01:00