diff options
Diffstat (limited to 'scripts/docgen.lua')
| -rw-r--r-- | scripts/docgen.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/docgen.lua b/scripts/docgen.lua index 50aef029..ee275f24 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -63,7 +63,7 @@ local function make_section(indentlvl, sep, parts) end local function readfile(path) - assert(util.path.is_file(path)) + assert((uv.fs_stat(path) or {}).type == 'file') return io.open(path):read '*a' end @@ -181,10 +181,10 @@ local function make_lsp_sections() function() local package_json_name = util.path.join(tempdir, config_name .. '.package.json') if docs.package_json then - if not util.path.is_file(package_json_name) then + if not ((uv.fs_stat(package_json_name) or {}).type == 'file') then os.execute(string.format('curl -v -L -o %q %q', package_json_name, docs.package_json)) end - if not util.path.is_file(package_json_name) then + if not ((uv.fs_stat(package_json_name) or {}).type == 'file') then print(string.format('Failed to download package.json for %q at %q', config_name, docs.package_json)) os.exit(1) return |
