Skip to content

Commit

Permalink
get rid of names, otherwise the returned vector will have names like …
Browse files Browse the repository at this point in the history
…this:

         pdfcrop.pdfcrop            ghostcript.gs
"/usr/local/bin/pdfcrop"      "/usr/local/bin/gs"

this is an interesting "feature" of c()
  • Loading branch information
yihui committed Jan 23, 2021
1 parent f573088 commit 41af04a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 41af04a

Please sign in to comment.