dragosmg commented on a change in pull request #12486:
URL: https://github.com/apache/arrow/pull/12486#discussion_r812438616
##########
File path: r/tests/testthat/test-duckdb.R
##########
@@ -15,6 +15,19 @@
# specific language governing permissions and limitations
# under the License.
+test_that("meaningful error message when duckdb is not installed", {
+ new_lib <- tempfile()
+ dir.create(new_lib)
+ withr::with_libpaths(new_lib, {
+ ds <- InMemoryDataset$create(example_data)
+ expect_error(
+ to_duckdb(ds),
+ "Please install the `duckdb` package."
+ )
+ })
+ unlink(new_lib, recursive = TRUE)
Review comment:
An option could be to add
```r
dir.create(Sys.getenv("R_LIBS_USER"), recursive=TRUE)
```
to our CI jobs before installing any dependencies. That way we make sure
anything we install will not be in the system library. `R_LIBS_USER` should by
default be at `.libPaths()[1]` unless it doesn't exists (when it is silently
ignored)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]