From 9a8c9f8a327573e6ad4ce0aeea8285541291bb1c Mon Sep 17 00:00:00 2001 From: wlandau Date: Sun, 6 Jan 2019 20:05:06 -0500 Subject: [PATCH] Fix #658 --- R/exec-meta.R | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/R/exec-meta.R b/R/exec-meta.R index 7135b5f0a..6f4a47e7c 100644 --- a/R/exec-meta.R +++ b/R/exec-meta.R @@ -90,6 +90,9 @@ dependency_hash <- function(target, config) { if (is_imported(target, config)) { deps <- c(deps, x$file_in, x$knitr_in) } + if (!length(deps)) { + return("") + } deps <- unlist(deps) deps <- as.character(deps) deps <- unique(deps) @@ -110,6 +113,9 @@ input_file_hash <- function( ) { deps <- config$layout[[target]]$deps_build files <- sort(unique(as.character(c(deps$file_in, deps$knitr_in)))) + if (!length(files)) { + return("") + } out <- vapply( X = files, FUN = file_hash, @@ -132,6 +138,9 @@ output_file_hash <- function( ) { deps <- config$layout[[target]]$deps_build files <- sort(unique(as.character(deps$file_out))) + if (!length(files)) { + return("") + } out <- vapply( X = files, FUN = file_hash,