Skip to content

Commit b58e42f

Browse files
authored
Merge pull request #293 from tidymodels/missing-pkg-fix
Fix missing package error
2 parents 8e1ba7d + 524cf7e commit b58e42f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NEWS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# parsnip (development version)
2-
3-
# parsnip 0.0.5.9000
1+
# parsnip 0.1.1
42

53
## Other Changes
64

75
* S3 dispatch for `tidy()` was broken on R 4.0.
86

7+
* The error message for missing packages was fixed (#289 and #292)
8+
99
# parsnip 0.0.5
1010

1111
## Fixes

R/engines.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ check_installs <- function(x) {
4242
if (length(x$method$libs) > 0) {
4343
is_inst <- map_lgl(x$method$libs, is_installed)
4444
if (any(!is_inst)) {
45+
missing_pkg <- x$method$libs[!is_inst]
46+
missing_pkg <- paste0(missing_pkg, collapse = ", ")
4547
rlang::abort(
4648
glue::glue(
4749
"This engine requires some package installs: ",
48-
glue::glue_collapse(glue::glue("'{x}'"), sep = ", ")
50+
glue::glue_collapse(glue::glue("'{missing_pkg}'"), sep = ", ")
4951
)
5052
)
5153
}

0 commit comments

Comments
 (0)