Skip to content

Commit ebb55a0

Browse files
committed
modify npm check method
In previous versions of node.js, default output is 0, in latest version default output is 1. Use `npm version` to check whether npm is correctly installed.
1 parent 4b783da commit ebb55a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/checkForGitbook.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#' @param quiet logical indicating whether messages should be printed.
77
#' @export
88
checkForGitbook <- function(quiet=FALSE) {
9-
if(system('npm', ignore.stdout=TRUE) != 0) {
9+
if(system('npm version', ignore.stdout=TRUE) != 0) {
1010
stop("Cannot find node.js. You can install it from http://nodejs.org/download/")
1111
}
1212
if(system('gitbook', ignore.stdout=TRUE) != 0) {

0 commit comments

Comments
 (0)