Commit 53c0a7f2 authored by Francois Michonneau's avatar Francois Michonneau
Browse files

make sure that checkpoint version is 0.4.0 or higher

parent df9ba824
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6,12 +6,12 @@ generate_md_episodes <- function() {
    if (!require("stringr"))
        stop("The package stringr is required for generating the lessons.")

    if (require("checkpoint")) {
    if (require("checkpoint") && packageVersion("checkpoint") >=  '0.4.0') {
        required_pkgs <-
             checkpoint:::scanForPackages(project = "_episodes_rmd",
                                          verbose=FALSE, use.knitr = TRUE)$pkgs
    } else {
        stop("The checkpoint package is required to build the lessons.")
        stop("The checkpoint package (>= 0.4.0) is required to build the lessons.")
    }

    missing_pkgs <- required_pkgs[!(required_pkgs %in% rownames(installed.packages()))]