Skip to content

Conversation

@44ka28ta
Copy link

When pandoc executes as the child process, the execution location is obscure. So, PDF generation fails in my environment. this error log shown in the console of the developer tool is as follows:

[Plugin Host] exec error: Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c
"pandoc "c:\Users\hata\Documents\sample.md" -o "c:\Users\hata\Documents\sample.pdf"
--latex-engine=xelatex -V documentclass=bxjsarticle -V geometry:a4paper -V classoption:pandoc -V classoption:jafont=yu-win"
pandoc: CreateDirectory ".\\tex2pdf.7496": permission denied

Probably, the child process of pandoc executes in a system directory.
For this reason, I modified the code for to specify the execution path of the child process and PDF generation succeeded.

When pandoc executes as the child process, the execution location is obscure. So, PDF generation fails in my environment. For this reason, I modified the code for to specify the execution path of the child process.
@satokaz
Copy link
Contributor

satokaz commented Jun 1, 2016

@dfinke, There are users who have the same problem.

Current directory when code.exe process was started further is set to cwd of code.exe.
Will fail if no write access to the set cwd.

adding {cwd filePath}, cwd of the called exec process is set to filePath.
I believe that it is possible to avoid the problem in this fix.

Could you merge the PR?

@dfinke
Copy link
Owner

dfinke commented Jun 1, 2016

Thanks for the PR. Let me review and test. I may not be able to get to this for a couple of days

satokaz added a commit to satokaz/vscode-pandoc that referenced this pull request Jul 9, 2016
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

Successfully merging this pull request may close these issues.

3 participants