Hi cderv,
I mentioned in my original post that I had installed pandoc separately to see if this would resolve my issues - this is why the version was v2.18 (latest pandoc version) and not v2.17 (the version included with RStudio).
I have now reverted to v2.17 by uninstalling v2.18 and repeated the steps you mentioned. RSTUDIO_PANDOC now points to the default directory:
> Sys.getenv("RSTUDIO_PANDOC")
[1] "D:/Program Files/RStudio/bin/quarto/bin"
And I confirmed this by checking in cmd:
C:\Users\Timothy>"D:/Program Files/RStudio/bin/quarto/bin/pandoc.exe" --version
pandoc.exe 2.17.1.1
Compiled with pandoc-types 1.22.1, texmath 0.12.4, skylighting 0.12.2,
citeproc 0.6.0.1, ipynb 0.2
User data directory: C:\Users\Timothy\AppData\Roaming\pandoc
Copyright (C) 2006-2022 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
But when I try looking for pandoc in R, nothing is there:
> rmarkdown:::find_program('pandoc')
pandoc
""
Using other commands in rmarkdown invokes errors identical to the ones described in the original post:
> rmarkdown:::pandoc_available()
Error: invalid version specification ‘getAppUserDataDirectory:sHGetFolderPath:’
In addition: Warning message:
In system(paste(shQuote(path), "--version"), intern = TRUE) :
running command '"D:/Program Files/RStudio/bin/quarto/bin/pandoc.exe" --version' had status 1
> rmarkdown:::find_pandoc()
Error: invalid version specification ‘getAppUserDataDirectory:sHGetFolderPath:’
In addition: Warning message:
In system(paste(shQuote(path), "--version"), intern = TRUE) :
running command '"D:/Program Files/RStudio/bin/quarto/bin/pandoc.exe" --version' had status 1