Skip to content

Commit

Permalink
Revert "Fix find_pandoc bug, add executable pandoc judgement (ramnath…
Browse files Browse the repository at this point in the history
…v#441)"

This reverts commit ca2acec.
  • Loading branch information
cpsievert committed Oct 28, 2022
1 parent ca2acec commit 3b04697
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ Imports:
grDevices,
htmltools (>= 0.5.3.9001),
jsonlite (>= 0.9.16),
yaml,
utils
yaml
Suggests:
knitr (>= 1.8),
rmarkdown,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ export(sizingPolicy)
import(htmltools)
importFrom(utils,browseURL)
importFrom(utils,file.edit)
importFrom(utils,file_test)
importFrom(utils,packageVersion)
2 changes: 1 addition & 1 deletion R/imports.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#' @import htmltools
NULL

#' @importFrom utils browseURL file.edit packageVersion file_test
#' @importFrom utils browseURL file.edit packageVersion
NULL
4 changes: 1 addition & 3 deletions R/pandoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ find_pandoc <- function() {

# determine the versions of the sources
versions <- lapply(sources, function(src) {
if (dir.exists(src))
if (file.exists(src))
get_pandoc_version(src)
else
numeric_version("0")
Expand Down Expand Up @@ -280,8 +280,6 @@ base_dir <- function(x) {
# Get an S3 numeric_version for the pandoc utility at the specified path
get_pandoc_version <- function(pandoc_dir) {
pandoc_path <- file.path(pandoc_dir, "pandoc")
if (is_windows()) pandoc_path <- paste0(pandoc_path, ".exe")
if (!utils::file_test("-x", pandoc_path)) return(numeric_version("0"))
with_pandoc_safe_environment({
version_info <- system(paste(shQuote(pandoc_path), "--version"),
intern = TRUE)
Expand Down

0 comments on commit 3b04697

Please sign in to comment.