diff --git a/R/checkForGitbook.R b/R/checkForGitbook.R index 80c6744..a07e1cd 100644 --- a/R/checkForGitbook.R +++ b/R/checkForGitbook.R @@ -6,7 +6,8 @@ #' @param quiet logical indicating whether messages should be printed. #' @export checkForGitbook <- function(quiet=FALSE) { - if(system('npm', ignore.stdout=TRUE) != 0) { + npm.test=system('npm', ignore.stdout=TRUE) + if(npm.test != 0 & npm.test != 1) { stop("Cannot find node.js. You can install it from http://nodejs.org/download/") } if(system('gitbook', ignore.stdout=TRUE) != 0) {