Skip to content

Commit 31ca76e

Browse files
authored
Verify jll availability (#323)
1 parent b97b163 commit 31ca76e

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Books"
22
uuid = "939d5c6b-51ae-42e7-97ca-7564d0d4ad91"
3-
version = "3.0.0"
3+
version = "3.0.1"
44

55
[deps]
66
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

src/Books.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ using Markdown: MD
2626
using Memoize: @memoize
2727
using ProgressMeter: ProgressMeter
2828
using Revise: entr
29-
using pandoc_crossref_jll: pandoc_crossref_path
30-
using pandoc_jll: pandoc
29+
using pandoc_crossref_jll: pandoc_crossref_jll
30+
using pandoc_jll: pandoc_jll
3131
using Typst_jll: typst
3232

3333
const GENERATED_DIR = "_gen"

src/build.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
const crossref_bin = string(pandoc_crossref_path)::String
1+
if !pandoc_jll.is_available()
2+
throw(ErrorException("pandoc_jll.jl installation failed"))
3+
end
4+
if !pandoc_crossref_jll.is_available()
5+
throw(ErrorException("pandoc_crossref_jll.jl installation failed"))
6+
end
7+
8+
const crossref_bin = string(pandoc_crossref_jll.pandoc_crossref_path)::String
29
const crossref = "--filter=$crossref_bin"
310
const include_lua_filter = joinpath(PKGDIR, "src", "include-codeblocks.lua")
411
const include_files = "--lua-filter=$include_lua_filter"
@@ -52,7 +59,7 @@ function copy_extra_directories(project)
5259
end
5360

5461
function call_pandoc(args)::Tuple{Base.Process, String}
55-
pandoc() do pandoc_bin
62+
pandoc_jll.pandoc() do pandoc_bin
5663
cmd = `$pandoc_bin $args`
5764
stdout = IOBuffer()
5865
p = run(pipeline(cmd; stdout))

0 commit comments

Comments
 (0)