It seems it is not possible to suppress either warnings or messages from is_online(), perhaps because they are neither. Still, it would be nice to be able to quiet is_online()...
> suppressMessages(pingr::is_online())
ping: google-public-dns-a.google.com: Temporary failure in name resolution
ping: b.resolvers.Level3.net: Temporary failure in name resolution
connect: Network is unreachable
connect: Network is unreachable
[1] FALSE
> suppressWarnings(pingr::is_online())
ping: google-public-dns-a.google.com: Temporary failure in name resolution
ping: b.resolvers.Level3.net: Temporary failure in name resolution
connect: Network is unreachable
connect: Network is unreachable
[1] FALSE
I believe this results from using the system() function:
hi @gaborcsardi,
It seems it is not possible to suppress either warnings or messages from
is_online()
, perhaps because they are neither. Still, it would be nice to be able to quietis_online()
...I believe this results from using the
system()
function:https://github.com/r-lib/pingr/blob/6da09409ba51a01bd16fdf782e06d74a9d32a469/R/ping-package.r#L65
Could you not change that
system
call to: