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

Failing include does not lead to non zero exit code #281

Closed
janvlug opened this issue Jul 11, 2024 · 1 comment
Closed

Failing include does not lead to non zero exit code #281

janvlug opened this issue Jul 11, 2024 · 1 comment

Comments

@janvlug
Copy link

janvlug commented Jul 11, 2024

When an include fails, pandoc still returns 0 when exiting.

Take for example this file:
example.md

and execute this pandoc command:

pandoc --fail-if-warnings --lua-filter=include-files.lua example.md --output jan.html

This results in this messages in the terminal:

Cannot open file file_to_include.html | Skipping includes

However, the exit code is still 0 instead of an error code.

Initially, I incorrectly reported this issue here: jgm/pandoc#9972

The response was:

Please re-raise this issue with the project from where you've gotten the include-files.lua filter. The filter should use the pandoc.log module to raise the warning.

Pandoc version?
pandoc 3.1.3
Features: -server +lua
Scripting engine: Lua 5.4

@tarleb tarleb closed this as completed in 4cbb8d8 Jul 11, 2024
@tarleb
Copy link
Member

tarleb commented Jul 11, 2024

I've pushed a fix, but it requires pandoc 3.1.4.

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