From 41af04ad2886a5a5f9f8b5fa4b559b003ee93323 Mon Sep 17 00:00:00 2001 From: Yihui Xie Date: Sat, 23 Jan 2021 11:31:21 -0600 Subject: [PATCH] get rid of names, otherwise the returned vector will have names like this: pdfcrop.pdfcrop ghostcript.gs "/usr/local/bin/pdfcrop" "/usr/local/bin/gs" this is an interesting "feature" of c() --- R/util.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/util.R b/R/util.R index 657a2f90d6..e900168e0b 100644 --- a/R/util.R +++ b/R/util.R @@ -314,8 +314,8 @@ find_program <- function(program) { has_crop_tools <- function() { tools <- c( - pdfcrop = find_program("pdfcrop"), - ghostcript = tools::find_gs_cmd() + pdfcrop = unname(find_program("pdfcrop")), + ghostcript = unname(tools::find_gs_cmd()) ) missing <- tools[tools == ""] if (length(missing) == 0) return(TRUE)