Skip to content

Commit b34cf4b

Browse files
committed
Wrap internet.ok check in try to avoid network errors
* there is one on CRAN solaris at the moment
1 parent 1259083 commit b34cf4b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test-all.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ if(!interactive())
88

99
# Is internet accessible?
1010
internet.ok = identical(
11-
status_code(HEAD("http://flybrain.mrc-lmb.cam.ac.uk/", timeout(2))),
11+
try(
12+
status_code(
13+
HEAD("http://flybrain.mrc-lmb.cam.ac.uk/", timeout(2))
14+
),
15+
silent = TRUE
16+
),
1217
200L
1318
)
1419

0 commit comments

Comments
 (0)