-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error message out of order? #39
Comments
Thanks. I need to review my usage of Lines 24 to 28 in ee86163
|
Though this is what I see.... > xfun::write_utf8("dummy", "test.md")
> pandoc_convert("test.md", from = "markdown", to = "word")
Error in `pandoc_run()` at pandoc/R/pandoc-convert.R:64:2:
! Running Pandoc failed with following error
• Unknown output format word
Run `rlang::last_trace()` to see where the error occurred. In which context do you see the above ? In reprex I am missing a line message it seems... xfun::write_utf8("dummy", "test.md")
pandoc::pandoc_convert("test.md", from = "markdown", to = "word")
#> Error in `pandoc_run()`:
#> ! Running Pandoc failed with following error
#> Backtrace:
#> ▆
#> 1. └─pandoc::pandoc_convert("test.md", from = "markdown", to = "word")
#> 2. └─pandoc::pandoc_run(args, version = version)
#> 3. └─rlang::abort(...) Created on 2023-09-22 with reprex v2.0.2 |
Ok - I can reproduce on Linux. So probably the same on Mac. |
This is about message capture for Pandoc output. It is not working the same on Windows and Linux. On windows > xfun::write_utf8("dummy", "test.md")
> system2(fs::path_expand(pandoc::pandoc_bin()), c("--to", "word", "test.md"), stdout = TRUE)
[1] "Unknown output format word"
attr(,"status")
[1] 22
Message d'avis :
Dans system2(fs::path_expand(pandoc::pandoc_bin()), c("--to", "word", :
l'exécution de la commande '"C:/Users/chris/AppData/Local/r-pandoc/r-pandoc/3.1.8/pandoc.exe" --to word test.md' renvoie un statut 22 On Linux ❯ system2(fs::path_expand(pandoc::pandoc_bin()), c("--to", "word", "test.md"), stdout = TRUE)
Unknown output format word
character(0)
attr(,"status")
[1] 22
Warning message:
In system2(fs::path_expand(pandoc::pandoc_bin()), c("--to", "word", :
running command ''/home/cderv/.local/share/r-pandoc/2.16.2/pandoc' --to word test.md' had status 22 I need |
So that the error can be shown within `rlang::abort()` correctly fixes #39
So that the error can be shown within `rlang::abort()` correctly fixes #39
Thanks ! this is fixed in dev version now. |
Thank you! |
It took me a minute to figure out the error because it's preceding, not following.
The text was updated successfully, but these errors were encountered: