Skip to content

Commit

Permalink
Better error message when build tools are not found
Browse files Browse the repository at this point in the history
Fixes #68
  • Loading branch information
jimhester committed Aug 5, 2019
1 parent 7b3f142 commit e043ff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

# dev

* `check_build_tools()` now has a more helpful error message which points you
towards ways to debug the issue (#68).

* `pkgbuild_process` now do not set custom compiler flags, and it uses
the user's `Makevars` file (@gaborcsardi, #76).

Expand Down
4 changes: 3 additions & 1 deletion R/build-tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ has_build_tools <- function(debug = FALSE) {
#' @rdname has_build_tools
check_build_tools <- function(debug = FALSE) {
if (!has_build_tools(debug = debug))
stop("Could not find tools necessary to compile a package", call. = FALSE)
stop(
"Could not find tools necessary to compile a package\n",
"Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.", call. = FALSE)

invisible(TRUE)
}
Expand Down

0 comments on commit e043ff2

Please sign in to comment.