Skip to content

Commit

Permalink
Do not show message if GS is installed on Windows
Browse files Browse the repository at this point in the history
See #398
  • Loading branch information
jeroen committed Jul 20, 2024
1 parent 92d9111 commit 407dba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/edit.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ image_read <- function(path, density = NULL, depth = NULL, strip = FALSE, coales
density <- as.character(density)
depth <- as.integer(depth)
defines <- validate_defines(defines)
if(is.character(path) && grepl("\\.pdf$", path) && Sys.which('gs') == ""){
if(is.character(path) && grepl("\\.pdf$", path) && Sys.which('gs') == "" && !file.exists('C:\\Program Files\\gs')){
message("Ghostscript (gs) not found on the PATH.\nTry image_read_pdf() to read PDF using pdftools instead.")
}
image <- if(isS4(path) && methods::is(path, "Image")){
Expand Down

0 comments on commit 407dba3

Please sign in to comment.