You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some invalid tex code in a manual (that I'm still trying to track down the exact error). When I tried to run build_manual(), it gives an error:
Errorin`value[[3L]]()`:!Failedtobuildmanual
But, that gives no information on the actual error itself. When I go into the code for build_manual(), it appears to try to cat the e$stdtout, but on Windows, that is missing. The e$stderr appears to have all of the output.
I think that the fix would either be to print(e) instead of cat(e$stdout) or perhaps it's an issue with callr::rcmd() in Windows not redirecting stderr to stdout correctly.
devtools::create(path="foo")
#> ✔ Creating 'foo/'#> ✔ Setting active project to 'C:/Users/wdenn/AppData/Local/Temp/RtmpOkKyEx/reprex-5e2414ea1ba0-bonny-fox/foo'#> ✔ Creating 'R/'#> ✔ Writing 'DESCRIPTION'#> Package: foo#> Title: What the Package Does (One Line, Title Case)#> Version: 0.0.0.9000#> Authors@R (parsed):#> * First Last <[email protected]> [aut, cre] (YOUR-ORCID-ID)#> Description: What the package does (one paragraph).#> License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a#> license#> Encoding: UTF-8#> Roxygen: list(markdown = TRUE)#> RoxygenNote: 7.2.1#> ✔ Writing 'NAMESPACE'#> ✔ Setting active project to '<no active project>'
setwd("foo")
cat(file="R/myfun.R",
"#' A function#' \\deqn{w_i = \\frac{\\delta_{time,i-1,i} + \\delta_{time,i,i+1}}{2}}{w_i = (d_time[i-1,i] + d_time[i,i+1])/2}#' \\deqn{\\delta_{time,i,i+1} = \\begin{cases}0 & i < 1 | i > K \\\\ t_{i+1} - t_i & otherwise\\end{cases}}{d_time = t_[i+1] - t_i, and zero if i < 1 or i > K}#' @name myfunNULL")
devtools::build_manual()
#> Error in `value[[3L]]()`:#> ! Failed to build manual#> Backtrace:#> ▆#> 1. └─devtools::build_manual()#> 2. └─base::tryCatch(...)#> 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers)#> 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])#> 5. └─value[[3L]](cond)#> 6. └─cli::cli_abort("Failed to build manual")#> 7. └─rlang::abort(...)
I have some invalid tex code in a manual (that I'm still trying to track down the exact error). When I tried to run
build_manual()
, it gives an error:But, that gives no information on the actual error itself. When I go into the code for
build_manual()
, it appears to try to cat thee$stdtout
, but on Windows, that is missing. Thee$stderr
appears to have all of the output.devtools/R/build-manual.R
Line 19 in aa3f88b
I think that the fix would either be to
print(e)
instead ofcat(e$stdout)
or perhaps it's an issue withcallr::rcmd()
in Windows not redirecting stderr to stdout correctly.Created on 2022-10-15 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: