From f8f336be91316fcbb070760f31e88ea359981cc2 Mon Sep 17 00:00:00 2001 From: al2na Date: Wed, 28 May 2014 16:23:33 +0200 Subject: [PATCH] Update checkForGitbook.R npm test via system() returns 1, not only zero. Although, npm is installed and works fine on Mac OS X 10.8.5 --- R/checkForGitbook.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {