Closed HenrikBengtsson closed 1 year ago
I just hit this in a bookdown render workflow (which is neither here nor there). I doubt it really matters, but in case there's useful info, here's what it looked like:
trying URL 'https://cloud.r-project.org/bin/macosx/contrib/4.1/magrittr_2.0.3.tgz'
Content type 'application/x-gzip' length 227497 bytes (222 KB)
==================================================
downloaded 222 KB
Quitting from lines 1018-1019 (Whole-game.Rmd)
Error in "INSTALL_opts" %in% names(args) && grepl("--no-test-load", args$INSTALL_opts, :
'length(x) = 2 > 1' in coercion to 'logical(1)'
Calls: local ... update_cache -> update_cache_safe -> update_cache_binaries
In addition: Warning message:
In in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, :
You changed the working directory to /private/tmp/RtmpdCJdRv/regexcite (probably via setwd()). It will be restored to /Users/jenny/rrr/r-pkgs. See the Note section in ?knitr::knit
✓ Setting active project to '<no active project>'
Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) :
Failed to compile Whole-game.Rmd
I didn't really intend that rendering the book would install/update a package, so I'll go sort that out myself.
But just a reminder that there's still a condition length > 1 thing going on here. Like @henrikbengtsson, I've got env vars setup to surface this.
I think this (and #45) is fixed in https://github.com/r-lib/crancache/commit/fc51e313db93780b1efd870f1b6bd3b638c909d3. Thanks again!
In
update_cache_binaries()
, there's:https://github.com/r-lib/crancache/blob/e2185c76b6fcd36c9970cfa22ffd2cb62b13eb53/R/binaries.R#L7-L8
That
grepl()
statement can resolve to a logical vector of any length.I just ran into this indirectly (sorry, tried but fail to reproduce and don't have much time) where I ran with:
and received: