Skip to content

Commit 852c9bb

Browse files
committed
Merge branch 'main' of github.com:quarto-dev/quarto-cli into main
2 parents 43d2315 + 97d98a1 commit 852c9bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/resources/filters/quarto-pre/includes.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,15 @@ function readIncludeFiles(meta, includes, target)
5252
local status, err = pcall(function ()
5353
-- read file contents
5454
local f = io.open(pandoc.utils.stringify(file), "r")
55+
if f == nil then
56+
error("Error resolving " .. target .. "- unable to open file " .. file)
57+
os.exit(1)
58+
end
5559
local contents = f:read("*all")
5660
f:close()
5761
-- write as as raw include
5862
addInclude(meta, FORMAT, target, contents)
5963
end)
60-
61-
if not status then
62-
dump("FAILED TO READ FILE " .. file)
63-
error(err)
64-
end
6564
end
6665

6766

0 commit comments

Comments
 (0)