run url_check() with_pandoc_available() #11
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a function
with_pandoc_available()
and runsurl_check()
with it. Closes #10.with_pandoc_available()
is slightly different fromwith_pandoc_path()
. It first checks whether pandoc is on the PATH and only puts RStudio's pandoc on the PATH if it is not (assuming that users prefer to have the pandoc on the path that they deliberately installed over RStudio's). If neither is available,with_pandoc_available()
throws an error.with_pandoc_available()
is then applied tourl_db_from_package_sources()
inurl_check()
(in order to fail early if pandoc is not available).Side note: I don't quite understand the
if(requireNamespace("xml2", quietly = TRUE))
:urlchecker/R/urltools.R
Line 286 in 65a2f31
urlchecker/R/urltools.R
Line 315 in 65a2f31
Can't this be ommitted? xml2 is in Imports, so it has to be available. If it wasn't, not all potential URL locations would be checked.