Try to debug JSON parsing failure
parent
425e716d17
commit
4f6575a987
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
-- luacheck: push
|
-- luacheck: push
|
||||||
-- luacheck: globals config readtext readbinary
|
-- luacheck: globals config readtext readbinary
|
||||||
|
|
||||||
|
@ -11,7 +10,7 @@ return {
|
||||||
type = "",
|
type = "",
|
||||||
title = "",
|
title = "",
|
||||||
short_description = "",
|
short_description = "",
|
||||||
tags= {},
|
tags = {},
|
||||||
content_warnings = {},
|
content_warnings = {},
|
||||||
license = "MIT",
|
license = "MIT",
|
||||||
media_license = "MIT",
|
media_license = "MIT",
|
||||||
|
@ -24,4 +23,4 @@ return {
|
||||||
screenshots = {readbinary("screenshot.png")}
|
screenshots = {readbinary("screenshot.png")}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- luacheck: pop
|
-- luacheck: pop
|
||||||
|
|
|
@ -41,6 +41,11 @@ module.exports = async cwd => {
|
||||||
hook.stdin.end();
|
hook.stdin.end();
|
||||||
await hook.promise;
|
await hook.promise;
|
||||||
|
|
||||||
const spec = JSON.parse(buff);
|
try {
|
||||||
config.set('gitlua', spec);
|
const spec = JSON.parse(buff);
|
||||||
|
config.set('gitlua', spec);
|
||||||
|
} catch (err) {
|
||||||
|
console.log('Raw JSON: ' + buff);
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue