We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e37e3a3 commit c9f2354Copy full SHA for c9f2354
git2.nobj.lua
@@ -85,12 +85,15 @@ subfiles {
85
--
86
-- Load parsed libgit2 docs.
87
88
-local json = require"json"
89
local file = io.open("docs/libgit2.json", "r")
90
-local libgit2_docs = json.decode(file:read("*a"))
+local text = file:read("*a")
91
file:close()
92
-
93
-local lg_funcs = libgit2_docs.functions
+local ok, json = pcall(require, "json")
+local lg_funcs = {}
+if ok then
94
+ local libgit2_docs = json.decode(text)
95
+ lg_funcs = libgit2_docs.functions
96
+end
97
98
-- Copy docs from libgit2
99
reg_stage_parser("pre_gen",{
0 commit comments