Skip to content

Commit

Permalink
provide resolution hint when missing package dependencies
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87187 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
urbaneks committed Sep 23, 2024
1 parent 545f8a9 commit 2ab5d99
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/library/tools/R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ if(FALSE) {
do_exit_on_error()
}

pkgerrmsg <- function(msg, pkg)
errmsg(msg, " for package ", sQuote(pkg))
pkgerrmsg <- function(msg, pkg, ...)
errmsg(msg, " for package ", sQuote(pkg), ...)

## 'pkg' is the absolute path to package sources.
do_install <- function(pkg)
Expand Down Expand Up @@ -1006,10 +1006,14 @@ if(FALSE) {
if (length(miss) > 1)
pkgerrmsg(sprintf("dependencies %s are not available",
paste(sQuote(miss), collapse = ", ")),
pkg_name)
pkg_name,
sprintf("\nPerhaps try a variation of:\ninstall.packages(c(%s))",
paste(shQuote(miss), collapse = ", ")))
else if (length(miss))
pkgerrmsg(sprintf("dependency %s is not available",
sQuote(miss)), pkg_name)
sQuote(miss)), pkg_name,
sprintf("\nPerhaps try a variation of:\ninstall.packages(%s)",
shQuote(miss)))
}

starsmsg(stars, "installing *source* package ",
Expand Down

0 comments on commit 2ab5d99

Please sign in to comment.