Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--version "getAppUserDataDirectory: illegal operation (unsupported operation)" #3241

Closed
athafoud opened this issue Nov 18, 2016 · 1 comment

Comments

@athafoud
Copy link

@athafoud athafoud commented Nov 18, 2016

I am calling pandoc (via rmarkdown) though an SQL Server (R Services install) 2016 script. The render function of rmarkdown calls a pandoc wrapper (https://github.com/rstudio/rmarkdown/blob/cran-1.1/R/pandoc.R) to identify the version of pandoc.

The pandoc.exe --version returns 1 (running command '"pandoc.exe" --version' had status 1). This happen due to the falling error

pandoc.exe: getAppUserDataDirectory: illegal operation (unsupported operation)

Since pandoc has an error when trying to identify the User Directory, it 'breaks' the '--version' function without returning anything.

My suggestion is, instead of breaking the '--version' function to just catch the error and return empty in "Default user data directory:..."

Some more info: For this specific case the getAppUserDataDirectory does not mean the the User does not have a directory, it is just mean that the Haskel functions (https://hackage.haskell.org/package/directory-1.0.0.3/docs/src/System-Directory.html) and subsequently the win32 libraries that Haskell uses cannot 'find' that directory. This is happening, because the user that run the R Script (thus calling the pandoc.exe) is not a 'real' user. With the SQL Server 2016, introduced trusted launchpad, which decided which worker user (from a worker pool) will execute the R script.

@jgm
Copy link
Owner

@jgm jgm commented Nov 18, 2016

Good call, we should trap errors in getUserDataDirectory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants