Skip to content

Commit 1486dfe

Browse files
Merge pull request #610 from lorenzwalthert/dev-roxygen-wrong-error-message
Re-instantiate roxygen error message
2 parents dcd2a60 + 5cb5a2b commit 1486dfe

File tree

3 files changed

+20
-19
lines changed

3 files changed

+20
-19
lines changed

.pre-commit-config.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# R specific hooks: https://github.com/lorenzwalthert/precommit
33
repos:
44
- repo: https://github.com/lorenzwalthert/precommit
5-
rev: v0.4.3.9003
5+
rev: 111b95a44750a710337f71d3886832b95b327774
66
hooks:
77
- id: style-files
88
args: [--style_pkg=styler, --style_fun=tidyverse_style, --cache-root=styler-perm]
@@ -31,34 +31,34 @@ repos:
3131
- id: spell-check
3232
exclude: >
3333
(?x)^(
34+
(.*/|)NAMESPACE|
35+
(.*/|)WORDLIST|
36+
(.*/|)\.Rbuildignore|
37+
(.*/|)\.Renviron|
38+
(.*/|)\.Rprofile|
39+
(.*/|)\.gitignore|
40+
(.*/|)\.pre-commit-.*|
41+
(.*/|)\.travis\.yml|
42+
(.*/|)appveyor\.yml|
43+
(.*/|)renv/settings\.dcf|
44+
(.*/|)renv\.lock|
45+
.*\.RData|
46+
.*\.Rds|
47+
.*\.Rproj|
3448
.*\.[rR]|
3549
.*\.feather|
3650
.*\.jpeg|
3751
.*\.pdf|
3852
.*\.png|
3953
.*\.py|
40-
.*\.RData|
4154
.*\.rds|
42-
.*\.Rds|
43-
.*\.Rproj|
4455
.*\.sh|
45-
(.*/|)\.gitignore|
46-
(.*/|)\.pre-commit-.*|
47-
(.*/|)\.Rbuildignore|
48-
(.*/|)\.Renviron|
49-
(.*/|)\.Rprofile|
50-
(.*/|)\.travis\.yml|
51-
(.*/|)appveyor\.yml|
52-
(.*/|)NAMESPACE|
53-
(.*/|)renv/settings\.dcf|
54-
(.*/|)renv\.lock|
55-
(.*/|)WORDLIST|
56+
LICENSE|
5657
\.github/workflows/.*|
5758
data/.*|
5859
inst/hooks/.*|
5960
inst/pre-commit-.*|
6061
inst/usethis-legacy-hook|
61-
LICENSE|
6262
renv/.*|
6363
revdep/.*|
6464
tests/testthat/in/.*|

R/roxygen2.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ roxygenize_with_cache <- function(key, dirs) {
8585
error = function(e) e
8686
)
8787
if (
88-
inherits(out, "packageNotFoundError") ||
89-
("message" %in% names(out) && grepl("Dependency package(\\(s\\))? .* not available", out$message))
88+
inherits(out, c("packageNotFoundError", "rlib_error_package_not_found")) ||
89+
("message" %in% names(out) && grepl("The package .* is required\\.", conditionMessage(out)))
9090
) {
9191
rlang::abort(paste0(
9292
conditionMessage(out),
@@ -97,7 +97,7 @@ roxygenize_with_cache <- function(key, dirs) {
9797
" - id: roxygenize",
9898
"
9999
additional_dependencies:
100-
- r-lib/pkgapi\n\n"
100+
- r-lib/pkgapi # replace `r-lib/pkgapi` with the package required\n\n"
101101
))
102102
} else if (inherits(out, "error")) {
103103
rlang::abort(conditionMessage(out))

precommit.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 3e63e6ad-9f4f-48c7-9a5f-2cbad1d4915d
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

0 commit comments

Comments
 (0)